/* Domus Pontificia — stile
   Grigio chiarissimo e grigio antracite: niente nero pieno da nessuna parte. Titoli in un serif sottile (Cormorant Garamond),
   testi in un bastone leggero (Jost), linee fini, niente angoli arrotondati. */

:root {
  --bg: #F5F5F5;
  --bg-2: #ECECEC;
  --card: #FFFFFF;
  --ink: #3C3C3C;
  --muted: #7A7A7A;
  --btn: #77736D;
  --btn-su: #5F5C57;
  --line: rgba(60, 60, 60, .18);
  --line-light: rgba(255, 255, 255, .26);
  --pad: clamp(20px, 4vw, 56px);
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Jost", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
em { font-style: italic; }

/* Le due lingue stanno nella stessa pagina: se ne vede una sola. */
html[data-lang="en"] body [lang="it"],
html[data-lang="it"] body [lang="en"] { display: none !important; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }

/* I titoli: serif sottile, minuscolo, con il corsivo a dare l'accento */
.title, .statement, .hero h1 { font-family: var(--serif); font-weight: 300; letter-spacing: -.01em; }
.title { font-size: clamp(2.3rem, 4.6vw, 3.9rem); line-height: 1.04; }
.eyebrow { font-size: 11px; font-weight: 400; letter-spacing: .26em; text-transform: uppercase; }
.lead { margin-top: 18px; max-width: 40ch; color: var(--muted); }

/* ───────── Pulsanti ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 50px; padding: 0 30px;
  font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
  border: 1px solid currentColor;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, opacity .3s ease;
}
.btn-light { color: #fff; border-color: rgba(255,255,255,.8); }
.btn-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-dark { background: var(--btn); color: #fff; border-color: var(--btn); }
.btn-dark:hover { background: var(--btn-su); border-color: var(--btn-su); }
.btn-line { color: var(--ink); }
.btn-line:hover { background: var(--btn); color: #fff; border-color: var(--btn); }

/* ───────── Barra in alto ───────── */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad);
  padding-top: max(14px, env(safe-area-inset-top));
  color: #fff;
  transition: background-color .4s ease, color .4s ease, box-shadow .4s ease;
}
/* il logo nella barra compare solo dopo l'apertura, dove è già in grande */
.brand { display: flex; align-items: center; padding: 10px 0; opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.brand img { height: 11px; width: auto; filter: invert(1); opacity: .74; }
.top.solid .brand { opacity: 1; pointer-events: auto; }
.top-right { display: flex; align-items: center; gap: 18px; }
.lang { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 400; letter-spacing: .18em; }
.lang button { padding: 10px 4px; opacity: .55; transition: opacity .3s ease; }
.lang span { opacity: .4; }
html[data-lang="en"] .lang [data-set-lang="en"],
html[data-lang="it"] .lang [data-set-lang="it"] { opacity: 1; }
.top-book {
  min-height: 38px; padding: 0; max-width: 0; margin-left: -18px; border-width: 0; overflow: hidden; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease, max-width .4s ease, padding .4s ease, margin .4s ease, background-color .3s ease, color .3s ease;
}
.top.solid {
  background: rgba(245, 245, 245, .93);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.top.solid .top-book { opacity: 1; pointer-events: auto; max-width: 220px; padding: 0 20px; margin-left: 0; border-width: 1px; }

/* ───────── 1 · Apertura ───────── */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  color: #fff; overflow: hidden; background: #8D9197; text-align: center;
}
.hero-img, .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 42% 50%;
}
/* il video parte sopra il fermo immagine e compare solo quando sta davvero girando */
.hero-video { opacity: 0; transition: opacity 1.2s ease; }
.hero-video.on { opacity: 1; }
@media (max-aspect-ratio: 1/1) { .hero-img, .hero-video { object-position: 50% 50%; } }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,30,32,.36) 0%, rgba(30,30,32,.03) 22%, rgba(30,30,32,.26) 45%, rgba(30,30,32,.62) 72%, rgba(30,30,32,.8) 100%);
}
.hero-text {
  position: relative; z-index: 2; width: 100%; max-width: 980px;
  padding: 120px var(--pad) clamp(30px, 5vh, 56px);
  display: flex; flex-direction: column; align-items: center;
  text-shadow: 0 1px 26px rgba(30,30,32,.4);
}
.hero h1 { margin: 0 0 22px; line-height: 0; }
.hero h1 img { width: min(80vw, 780px); height: auto; filter: drop-shadow(0 1px 18px rgba(30,30,32,.4)); }
.hero-kind { font-size: clamp(11px, 1.15vw, 15px); font-weight: 400; letter-spacing: .42em; text-transform: uppercase; margin: 0 0 26px; padding-left: .42em; }
.hero-sub { max-width: 42ch; color: rgba(255,255,255,.92); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin-top: 30px; text-shadow: none; }
.hero-link { font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; text-underline-offset: 7px; padding: 12px 0; }
.hero-facts {
  position: relative; z-index: 2; width: 100%;
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line-light);
  padding: 0 var(--pad); padding-bottom: env(safe-area-inset-bottom);
}
.hero-facts li { padding: 16px 6px 18px; display: flex; flex-direction: column; align-items: center; gap: 0; }
.hero-facts li + li { border-left: 1px solid var(--line-light); }
.hero-facts b { font-family: var(--serif); font-weight: 300; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.05; }
.hero-facts li > span { font-size: 10.5px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.8); }

.hero-text > * { animation: sale .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-text > :nth-child(1) { animation-delay: .1s; }
.hero-text > :nth-child(2) { animation-delay: .22s; }
.hero-text > :nth-child(3) { animation-delay: .36s; }
.hero-text > :nth-child(4) { animation-delay: .5s; }
/* solo spostamento, niente trasparenza: se l'animazione non parte il testo si legge lo stesso */
@keyframes sale { from { transform: translateY(26px); } to { transform: none; } }

/* ───────── 2 · La casa ───────── */
.casa { padding: clamp(72px, 10vw, 140px) 0 clamp(60px, 8vw, 110px); }
.casa-head {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: end;
  gap: clamp(24px, 6vw, 96px); margin-bottom: clamp(36px, 5vw, 64px);
}
.statement { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.08; }
.casa-side { display: flex; flex-direction: column; gap: 22px; }
.casa-text { color: var(--muted); max-width: 44ch; }
.strip-nav { display: flex; gap: 8px; }
.strip-nav button, .cal-nav button {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%;
  font-size: 15px; font-weight: 300; line-height: 1; transition: background-color .3s ease, color .3s ease, opacity .3s ease;
}
.strip-nav button:hover, .cal-nav button:hover:not(:disabled) { background: var(--btn); color: #fff; border-color: var(--btn); }
.strip {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 max(var(--pad), calc((100vw - 1280px) / 2 + var(--pad)));
  scroll-padding-left: max(var(--pad), calc((100vw - 1280px) / 2 + var(--pad)));
  scrollbar-width: none; -webkit-overflow-scrolling: touch; outline-offset: 4px;
}
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: 0 0 min(80vw, 660px); scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg-2); cursor: zoom-in; }
.strip figcaption { display: flex; gap: 14px; align-items: baseline; margin-top: 14px; font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; }
.strip figcaption i { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.amen {
  display: grid; grid-template-columns: repeat(4, 1fr); column-gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(40px, 5vw, 68px);
}
.amen li { padding: 15px 0; border-top: 1px solid var(--line); font-size: 15px; }

/* ───────── La planimetria ───────── */
.plan { padding: clamp(72px, 10vw, 140px) 0; }
.plan-grid { display: grid; grid-template-columns: 1fr 1.9fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.plan-list { margin-top: 30px; }
.plan-list > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.plan-list > div:last-child { border-bottom: 1px solid var(--line); }
.plan-list dd { font-family: var(--serif); font-size: 1.35rem; line-height: 1; }
.plan-note { margin-top: 16px; font-size: 13px; color: var(--muted); }
.plan-fig { background: var(--card); padding: clamp(12px, 2.4vw, 36px); }
.pianta { display: block; width: 100%; height: auto; }
.pianta text { font-family: var(--serif); font-weight: 400; letter-spacing: .01em; fill: var(--ink); }
.pl-stanza { font-size: 56px; }
.pl-piccolo { font-size: 42px; }
.pl-minimo { font-size: 25px; }
.pl-corsivo { font-style: italic; }

/* ───────── La valutazione degli ospiti ───────── */
.band { background: var(--card); color: var(--ink); padding: clamp(34px, 4.4vw, 54px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-in { display: flex; align-items: center; gap: clamp(20px, 3.4vw, 48px); flex-wrap: wrap; }
.band-num { font-family: var(--serif); font-weight: 300; font-size: clamp(3.6rem, 7vw, 5.6rem); line-height: .9; }
.band-num small { font-size: .42em; margin-left: .12em; color: var(--muted); }
.band-txt { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.band-txt b { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.band-txt > span { font-size: 14px; color: var(--muted); }
.band-link { font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; text-underline-offset: 7px; white-space: nowrap; padding: 12px 0; }

/* ───────── 3 · Disponibilità ───────── */
.avail { background: var(--bg-2); padding: clamp(72px, 10vw, 140px) 0; scroll-margin-top: 62px; }
.avail-grid {
  display: grid; grid-template-columns: 1fr 1.35fr; grid-template-areas: "testa cal" "modulo cal";
  grid-template-rows: auto 1fr; column-gap: clamp(36px, 6vw, 96px); align-items: start;
}
.avail-head { grid-area: testa; }
.avail-form { grid-area: modulo; }
.cal { grid-area: cal; position: relative; background: var(--card); padding: clamp(18px, 2.4vw, 34px); }
.cal-nav {
  position: absolute; top: clamp(18px, 2.4vw, 34px); left: clamp(18px, 2.4vw, 34px); right: clamp(18px, 2.4vw, 34px);
  display: flex; justify-content: space-between; pointer-events: none;
}
.cal-nav button { pointer-events: auto; }
.cal-nav button:disabled { opacity: .25; cursor: default; }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vw, 46px); min-height: 300px; }
.cal-month h3 {
  font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 44px;
  text-align: center; text-transform: capitalize; margin-bottom: 12px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { font-size: 10px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 8px; }
.cal-grid button {
  aspect-ratio: 1; min-height: 34px; font-size: 15px; font-weight: 400; font-variant-numeric: tabular-nums;
  transition: background-color .2s ease, color .2s ease;
}
.cal-grid button:disabled { cursor: default; }
.cal-grid button:not(:disabled):hover { background: rgba(60, 60, 60, .09); }
.cal-grid button.today { box-shadow: inset 0 -1px 0 var(--ink); }
.cal-grid button.past { color: rgba(60, 60, 60, .3); }
.cal-grid button.busy {
  color: rgba(60, 60, 60, .38); text-decoration: line-through;
  background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(60, 60, 60, .1) 5px 6px);
}
.cal-grid button.mid { background: rgba(119, 115, 109, .2); }
.cal-grid button.sel, .cal-grid button.sel:hover { background: var(--btn); color: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; font-size: 13px; color: var(--muted); }
.cal-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 1px solid var(--line); }
.lg-busy { background: repeating-linear-gradient(135deg, transparent 0 3px, rgba(60, 60, 60, .3) 3px 4px); }
.lg-sel { background: var(--btn); border-color: var(--btn) !important; }

.listino { margin-top: 28px; }
.listino > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.listino > div:last-child { border-bottom: 1px solid var(--line); }
.listino dt { display: flex; flex-direction: column; font-size: 15px; }
.listino dt small { font-size: 12px; color: var(--muted); }
.listino dd { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1; white-space: nowrap; }
.listino-nota { margin-top: 10px; font-size: 13px; color: var(--muted); }
.pick { margin: 30px 0 26px; }
.pick-tot dt { display: flex; flex-direction: column; }
.pick-tot dt small { font-size: 12px; color: var(--muted); }
.pick-tot dd { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; line-height: 1; }
.pick > div {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  min-height: 54px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px;
}
.pick > div:last-child { border-bottom: 1px solid var(--line); }
.pick dt { color: var(--muted); }
.pick dd { text-align: right; font-weight: 400; font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper output { min-width: 1.5em; text-align: center; }
.stepper button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; font-size: 16px; font-weight: 300; line-height: 1; }
.stepper button:hover { background: var(--btn); color: #fff; border-color: var(--btn); }
.avail-form .btn { width: 100%; }
.btn.off { opacity: .4; }
.avail-note { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--muted); min-height: 3em; }
.avail-note.forte { color: var(--ink); font-weight: 400; }

/* ───────── 4 · Dove siamo ───────── */
.location { background: var(--card); padding: clamp(72px, 10vw, 140px) 0; }
.loc-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(36px, 6vw, 96px); align-items: start; }
.address { margin: 22px 0 28px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.6rem; line-height: 1.25; }
.dist > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.dist > div:last-child { border-bottom: 1px solid var(--line); }
.dist dd { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ───────── 5 · Contatti ───────── */
.foot { background: var(--bg-2); color: var(--ink); padding: clamp(56px, 8vw, 100px) 0 28px; }
.foot-in { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.foot-host { display: flex; flex-direction: column; gap: 16px; }
.foot-logo { width: min(320px, 70vw); height: auto; filter: invert(1); opacity: .74; }
.foot-host .eyebrow { color: var(--muted); letter-spacing: .34em; }
.foot-links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 15px; }
.foot-links a:not(.btn) { color: var(--ink); text-decoration: none; padding: 2px 0; }
.foot-links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; }
.foot-links .btn { margin-bottom: 8px; }
.foot-legal { margin-top: clamp(40px, 6vw, 72px); padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: .04em; color: var(--muted); }

/* ───────── Foto a tutto schermo ───────── */
.lente {
  position: fixed; inset: 0; z-index: 80; background: rgba(245, 245, 245, .98); color: var(--ink);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(6px, 2vw, 28px);
  padding: 56px clamp(8px, 2vw, 32px) 28px;
}
.lente[hidden] { display: none; }
.lente figure { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.lente img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); width: auto; height: auto; object-fit: contain; }
.lente figcaption { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); text-align: center; }
.lente-f, .lente-x { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); font-size: 16px; font-weight: 300; line-height: 1; }
.lente-f:hover, .lente-x:hover { background: var(--btn); color: #fff; border-color: var(--btn); }
.lente-x { position: absolute; top: max(12px, env(safe-area-inset-top)); right: clamp(10px, 2vw, 32px); font-size: 22px; }

/* ───────── Entrata dolce delle sezioni ───────── */
html.anim .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
html.anim .reveal.in { opacity: 1; transform: none; }

/* ───────── Telefono e tablet ───────── */
@media (max-width: 900px) {
  .brand img { height: 9px; }
  .hero-text { padding-top: 100px; }
  .hero-facts { padding: 0 6px; padding-bottom: env(safe-area-inset-bottom); }
  .hero-facts li { padding: 12px 2px 14px; }
  .hero-facts li > span { font-size: 9px; letter-spacing: .14em; }

  .casa-head { grid-template-columns: 1fr; gap: 20px; }
  .strip-nav { display: none; }
  .strip figure { flex-basis: 82vw; }
  .amen { grid-template-columns: 1fr 1fr; }

  .band-in { gap: 14px 22px; }

  .avail-grid { grid-template-columns: 1fr; grid-template-areas: "testa" "cal" "modulo"; grid-template-rows: auto; row-gap: 30px; }
  .cal { margin: 0 calc(var(--pad) * -1 + 8px); }
  .cal-months { grid-template-columns: 1fr; }
  .cal-month:nth-child(2) { display: none; }
  .cal-grid button { font-size: 16px; }
  .pick { margin-top: 0; }

  .loc-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-fig { margin: 0 calc(var(--pad) * -1 + 8px); padding: 10px; }
  /* sul telefono il disegno è piccolo: i nomi si ingrandiscono per restare leggibili */
  .pl-stanza { font-size: 66px; }
  .pl-piccolo { font-size: 50px; }
  .pl-minimo { display: none; }
  .lente { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; padding-bottom: 22px; }
  .lente figure { grid-column: 1 / -1; grid-row: 1; }
  .lente-f { grid-row: 2; justify-self: center; }
  .foot-in { flex-direction: column; }
}
@media (max-width: 380px) {
  .top.solid .top-book { padding: 0 14px; letter-spacing: .16em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text > * { animation: none; }
  .hero-video { display: none; }
  html.anim .reveal { opacity: 1; transform: none; transition: none; }
}
