/* Home (/), version 2: photographic and editorial. Loaded after site.css, only by Pages/Index.cshtml.
   Mockups: docs/public-site/mockups/Main.dc.html (1440 px) and HomeMobile.dc.html (390 px).
   Mobile first, breakpoint 960 px. Instrument Serif is used only here (big titles). */

:root {
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --home-max: 1320px;
  --veil: 10, 20, 18;
  --on-photo: #E6EAE7;
  --on-photo-label: #DCEAE6;
}

.home-wrap {
  width: 100%;
  max-width: var(--home-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.home-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.02;
}
.home-h2 { font-size: 44px; }
.home-eyebrow--light { color: var(--on-photo-label); }

.home-btn-outline { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .6); }
.home-btn-outline:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; }

/* Underlined text link ("Scopri la casa", "I luoghi che consigliamo"). */
.home-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  min-height: 44px;
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.home-link:hover { color: var(--accent); border-color: var(--accent); }

/* Focus ring readable on the photos. */
.home-hero :focus-visible,
.home-banner :focus-visible { outline-color: #FFFFFF; }

@media (min-width: 960px) {
  .home-h2 { font-size: 64px; }
}

/* ---------- Header over the hero (Pages/Shared/_Header.cshtml with ViewData["HeaderOverlay"]) ----------
   Without script it scrolls away with the photo; wwwroot/js/home.js makes it fixed ("is-fixed") and white
   once the photo is scrolled past ("is-solid"). With the phone menu open it is white too. */
.site-header--overlay {
  --hd-ink: #FFFFFF;
  --hd-line: rgba(255, 255, 255, .5);
  --hd-hover: rgba(255, 255, 255, .14);
  --hd-current-bg: #FFFFFF;
  --hd-current-ink: var(--ink);
  --hd-cta-bg: transparent;
  --hd-cta-line: rgba(255, 255, 255, .6);
  --hd-cta-hover: rgba(255, 255, 255, .14);
  --hd-toggle-bg: rgba(255, 255, 255, .12);
  --hd-logo-bg: rgba(255, 255, 255, .92);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: background-color .3s ease, border-color .3s ease;
}
.site-header--overlay.is-fixed { position: fixed; }
.site-header--overlay.is-solid,
.site-header--overlay:has(.menu-toggle[aria-expanded="true"]) {
  --hd-ink: var(--ink);
  --hd-line: var(--btn-line);
  --hd-hover: var(--stone);
  --hd-current-bg: var(--ink);
  --hd-current-ink: #FFFFFF;
  --hd-cta-bg: var(--accent);
  --hd-cta-line: transparent;
  --hd-cta-hover: var(--accent-hover);
  --hd-toggle-bg: #FFFFFF;
  --hd-logo-bg: transparent;
  background: rgba(255, 255, 255, .96);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-shadow: none;
}
.site-header--overlay .brand,
.site-header--overlay .brand:hover,
.site-header--overlay .main-nav .nav-link,
.site-header--overlay .lang-switch a { color: var(--hd-ink); }
.site-header--overlay .brand__logo { padding: 3px; border-radius: 9px; background: var(--hd-logo-bg); transition: background-color .3s ease; }
.site-header--overlay .main-nav .nav-link:hover { background: var(--hd-hover); color: var(--hd-ink); }
.site-header--overlay .lang-switch { border-color: var(--hd-line); }
.site-header--overlay .lang-switch a:hover { background: var(--hd-hover); }
.site-header--overlay .lang-switch a[aria-current="true"] { background: var(--hd-current-bg); color: var(--hd-current-ink); text-shadow: none; }
.site-header--overlay .site-header__cta { background: var(--hd-cta-bg); border-color: var(--hd-cta-line); color: #FFFFFF; }
.site-header--overlay .site-header__cta:hover { background: var(--hd-cta-hover); color: #FFFFFF; }
.site-header--overlay .menu-toggle { background: var(--hd-toggle-bg); border-color: var(--hd-line); color: var(--hd-ink); }
.site-header--overlay:not(.is-solid) :focus-visible { outline-color: #FFFFFF; }
.site-header--overlay:has(.menu-toggle[aria-expanded="true"]) :focus-visible { outline-color: var(--accent); }

/* ---------- Hero ---------- */
.home-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(680px, 92vh);
  padding-top: calc(var(--header-h) + 32px);
  overflow: hidden;
  background: var(--ink);
  color: #FFFFFF;
}
.home-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  transform-origin: 60% 60%;
}
/* Dark at the top (header over white walls) and at the bottom (text); clear in the middle. */
.home-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(var(--veil), .6) 0%,
    rgba(var(--veil), .45) 9%,
    rgba(var(--veil), 0) 22%,
    rgba(var(--veil), .58) 38%,
    rgba(var(--veil), .78) 62%,
    rgba(var(--veil), .85) 100%);
}
.home-hero__inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 32px;
}
.home-hero__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .25);
}
.home-hero__title { font-size: 60px; color: #FFFFFF; }
.home-hero__lead { font-size: 17px; line-height: 1.5; color: var(--on-photo); max-width: 560px; }
.home-hero__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; text-shadow: none; }

@media (min-width: 960px) {
  /* As tall as the window (up to 1000 px) so that the 4:3 photo is cropped as little as possible;
     the crop that remains takes the floor at the bottom, never the top of the house. */
  .home-hero { min-height: min(1000px, 100vh); }
  .home-hero__photo { object-position: 50% 30%; }
  .home-hero__veil {
    background: linear-gradient(180deg,
      rgba(var(--veil), .6) 0%,
      rgba(var(--veil), .45) 9%,
      rgba(var(--veil), 0) 24%,
      rgba(var(--veil), .12) 38%,
      rgba(var(--veil), .5) 58%,
      rgba(var(--veil), .72) 80%,
      rgba(var(--veil), .8) 100%);
  }
  .home-hero__inner { padding-bottom: 72px; }
  .home-hero__text { gap: 22px; }
  .home-hero__title { font-size: 96px; }
  .home-hero__lead { font-size: 20px; }
  .home-hero__actions { flex-direction: row; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
}

/* ---------- Chi siamo ---------- */
.home-about { padding: 56px 0; background: var(--stone); }
.home-about__inner { display: flex; flex-direction: column; gap: 30px; }
.home-about__text { display: flex; flex-direction: column; gap: 22px; }
.home-about__title { font-size: 40px; }
.home-about__body { font-size: 16px; color: var(--ink2); }
.home-about__signature { font-size: 24px; font-style: italic; line-height: 1.2; color: var(--ink); }
.home-about__figure { display: flex; flex-direction: column; gap: 12px; }
.home-about__photo { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; background: var(--photo-2); }

@media (min-width: 960px) {
  .home-about { padding: 120px 0; }
  .home-about__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 72px;
  }
  .home-about__text { gap: 24px; }
  .home-about__title { font-size: 50px; }
  .home-about__body { font-size: 17px; }
  .home-about__signature { font-size: 26px; }
}

/* ---------- Le case: one chapter per villa ---------- */
.home-villas { padding: 56px 0; }
.home-villas__inner { display: flex; flex-direction: column; gap: 44px; }
.home-villas__head { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }

.home-chapters { display: flex; flex-direction: column; gap: 44px; }
.home-chapter { position: relative; display: flex; flex-direction: column; gap: 18px; }
.home-chapter__media { height: 280px; overflow: hidden; border-radius: 4px; background: var(--photo-2); }
.home-chapter__photo { width: 100%; height: 100%; object-fit: cover; }
.home-chapter__text { display: flex; flex-direction: column; gap: 14px; }
.home-chapter__title { font-size: 40px; overflow-wrap: anywhere; }
.home-chapter__title a { color: var(--ink); text-decoration: none; }
.home-chapter:hover .home-chapter__title a { color: var(--accent); }
.home-chapter__lead { font-size: 16px; color: var(--ink2); }
.home-chapter__ratings { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.home-chapter__rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}
.home-chapter__rating strong { color: var(--ink); font-weight: 700; }
/* Capacity: "Fino a 6 ospiti · 100 m²", then how the guests sleep, aligned with the text after the icon. */
.home-chapter__capacity { display: flex; flex-direction: column; gap: 4px; }
.home-chapter__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}
.home-chapter__stats .icon { color: var(--accent); }
.home-chapter__stats strong { color: var(--ink); font-weight: 800; }
.home-chapter__beds { padding-left: 26px; font-size: 13px; color: var(--muted); }
.home-chapter:hover .home-chapter__more { color: var(--accent); border-color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .home-chapter__photo { transition: transform .8s ease; }
  .home-chapter:hover .home-chapter__photo { transform: scale(1.03); }
}

@media (min-width: 960px) {
  .home-villas { padding: 120px 0 40px; }
  .home-villas__inner { gap: 88px; }
  .home-villas__head { gap: 14px; }
  .home-chapters { gap: 88px; }
  .home-chapter {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 72px;
  }
  .home-chapter--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .home-chapter--flip .home-chapter__media { order: 2; }
  .home-chapter__media { height: 600px; }
  .home-chapter__text { gap: 20px; }
  .home-chapter__title { font-size: 56px; }
  .home-chapter__lead { font-size: 18px; }
  .home-chapter__stats { font-size: 16px; }
  .home-chapter__beds { font-size: 14px; }
}

/* ---------- Full-width photo bands (Il posto, Hai in mente delle date?) ---------- */
.home-banner {
  position: relative;
  display: flex;
  overflow: hidden;
  background: var(--ink);
  color: #FFFFFF;
}
.home-banner__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-banner__veil { position: absolute; inset: 0; }

.home-banner--place { align-items: flex-end; min-height: 420px; }
.home-banner--place .home-banner__photo { object-position: 40% 75%; }
.home-banner--place .home-banner__veil {
  background: linear-gradient(180deg, rgba(var(--veil), 0) 30%, rgba(var(--veil), .5) 62%, rgba(var(--veil), .72) 100%);
}
.home-banner__text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 120px;
  padding-bottom: 28px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .3);
}
.home-banner__title { color: #FFFFFF; max-width: 720px; }

.home-place__body { display: flex; flex-direction: column; gap: 28px; padding-top: 40px; padding-bottom: 56px; }
.home-place__cols { display: flex; flex-direction: column; gap: 28px; }
.home-place__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}
.home-place__title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.home-place__col p { font-size: 15px; color: var(--ink2); }

@media (min-width: 960px) {
  .home-place { padding-top: 120px; }
  .home-banner--place { min-height: 640px; }
  .home-banner--place .home-banner__photo { object-position: 50% 75%; }
  .home-banner__text { gap: 16px; padding-bottom: 64px; }
  .home-place__body { gap: 56px; padding-top: 72px; padding-bottom: 120px; }
  .home-place__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
  .home-place__col { gap: 12px; padding-top: 24px; }
  .home-place__title { font-size: 20px; }
  .home-place__col p { font-size: 16px; }
}

/* ---------- Reviews: overall Google score, then one review at a time (wwwroot/js/home.js) ---------- */
.home-review { padding: 56px 0; background: var(--stone); }
.home-review__inner { display: grid; gap: 28px; }
.home-review__scores { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.home-review__score { display: flex; align-items: center; gap: 14px; margin: 0; }
.home-review__score-value { font-size: 56px; line-height: 1; color: var(--ink); }
.home-review__score-side { display: flex; flex-direction: column; gap: 4px; }
.home-review__stars { display: flex; gap: 3px; }
.home-review__out-of { font-family: var(--font-head); font-size: 14px; font-weight: 700; line-height: 18px; color: var(--ink); }
.home-review__note {
  display: block;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
}
/* With the script all reviews share one grid cell: the box keeps the height of the longest. */
.home-review__slides { display: grid; }
.home-review__slide { display: flex; flex-direction: column; margin: 0; }
.is-carousel .home-review__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
}
.is-carousel .home-review__slide.is-current { opacity: 1; visibility: visible; }
.home-review__mark { height: 40px; font-size: 104px; line-height: .8; color: var(--accent); opacity: .3; }
.home-review__quote { margin: 0; font-size: 28px; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.home-review__quote p { margin: 0; }
.home-review__quote--long { font-size: 23px; }
.home-review__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 24px;
}
.home-review__author { display: flex; align-items: center; gap: 12px; }
.home-review__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
}
.home-review__name { display: block; font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--ink); }
.home-review__name a { color: inherit; }
.home-review__source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
}
.home-review__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.home-review__nav[hidden] { display: none; }
.home-review__dots { display: flex; }
.home-review__dot {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  cursor: pointer;
}
/* ::before is the dot (the bar's track while autoplaying), ::after the fill laid over it. */
.home-review__dot::before,
.home-review__dot::after {
  content: "";
  grid-area: 1 / 1;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--input);
  transition: width .2s ease, background-color .2s ease;
}
.home-review__dot::after { width: 0; background: var(--accent); }
.home-review__dot[aria-current="true"]::before { width: 22px; background: var(--accent); }
/* Autoplay (wwwroot/js/home.js): the active dot becomes a longer bar that fills in --review-autoplay;
   the end of the animation brings the next review, and pausing it pauses the change. */
.is-autoplay .home-review__dot[aria-current="true"]::before { width: 36px; background: var(--input); }
.is-autoplay .home-review__dot[aria-current="true"]::after {
  justify-self: start;
  width: 36px;
  transform-origin: left center;
  animation: home-review-progress var(--review-autoplay, 6s) linear both;
}
.is-autoplay-paused .home-review__dot[aria-current="true"]::after { animation-play-state: paused; }
@keyframes home-review-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.home-review__arrows { display: flex; gap: 8px; }
.home-review__arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--btn-line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.home-review__arrow:hover { border-color: var(--accent); color: var(--accent); }
@media (min-width: 960px) {
  .home-review { padding: 120px 0; }
  .home-review__inner { grid-template-columns: 280px minmax(0, 1fr); gap: 72px; align-items: start; }
  .home-review__score-value { font-size: 64px; }
  .home-review__note { font-size: 14px; }
  .home-review__quote { font-size: 38px; }
  .home-review__quote--long { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .is-carousel .home-review__slide, .home-review__dot::before, .home-review__dot::after { transition: none; }
}

/* ---------- Hai in mente delle date? ---------- */
.home-banner--dates { align-items: center; min-height: 540px; }
.home-banner--dates .home-banner__photo { object-position: 50% 35%; }
.home-banner--dates .home-banner__veil { background: rgba(var(--veil), .52); }
.home-dates {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 56px;
  padding-bottom: 56px;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .25);
}
.home-dates__title { font-size: 48px; color: #FFFFFF; }
.home-dates__lead { font-size: 16px; color: var(--on-photo); max-width: 560px; }
.home-dates__actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 6px; text-shadow: none; }

@media (min-width: 960px) {
  .home-banner--dates { min-height: 640px; }
  .home-dates { gap: 24px; }
  .home-dates__title { font-size: 72px; }
  .home-dates__lead { font-size: 19px; }
  .home-dates__actions { flex-direction: row; flex-wrap: wrap; justify-content: center; width: auto; gap: 12px; margin-top: 8px; }
}

/* ---------- Motion (wwwroot/js/home.js adds "home-reveal" to <html>; without script nothing is hidden) ---------- */
@keyframes home-hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
/* Il posto: slow zoom with a sideways drift, started by wwwroot/js/home.js when the band comes into
   view ("is-drifting"). Never below scale(1.04), so the 1.5% shift never uncovers an edge. */
@keyframes home-place-drift {
  from { transform: scale(1.04) translateX(1.5%); }
  to { transform: scale(1.1) translateX(-1.5%); }
}
@media (prefers-reduced-motion: no-preference) {
  .home-hero__photo { animation: home-hero-zoom 20s ease-out both; }
  [data-drift].is-drifting .home-banner__photo { animation: home-place-drift 24s ease-out both; }
  .home-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  }
  .home-reveal [data-reveal].is-visible { opacity: 1; transform: none; }
}
@media print {
  .home-reveal [data-reveal] { opacity: 1; transform: none; }
}
