
/* ── CSS specifico homepage ── */

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Hero background — CSS gradient is preload fallback, video replaces it */
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 60% 40%, oklch(22% 0.04 55 / 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, oklch(18% 0 0 / 0.6) 0%, transparent 50%),
    linear-gradient(165deg,
      oklch(8% 0 0) 0%,
      oklch(14% 0.035 80) 40%,
      oklch(10% 0 0) 100%
    );
}

/* Video fills hero — paints below ::after vignette (DOM order) */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* Vignette overlay — ::after paints above all children, keeps text legible */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 25%, oklch(5% 0 0 / 0.65) 100%),
    linear-gradient(to bottom,
      oklch(5% 0 0 / 0.45) 0%,
      transparent 25%,
      transparent 40%,
      oklch(5% 0 0 / 0.88) 100%
    );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 2.5rem 5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.hero__text {}
.hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-pale);
  font-weight: 400;
  text-shadow: 0 1px 10px oklch(5% 0 0 / 0.8);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.3s forwards;
}
.hero__title {
  font-family: var(--display); text-transform: uppercase;
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--ivory);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.5s forwards;
}
.hero__title em {
  font-family: var(--display); text-transform: uppercase;
  font-weight: 300;
  font-style: italic;
  color: var(--accent-pale);
}

.hero__meta {
  text-align: right;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.7s forwards;
}
.hero__address {
  font-size: var(--text-xs);
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--ivory-faint);
  line-height: 1.6;
}
.hero__scroll {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-2xs);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ivory-faint);
  margin-top: 1.5rem;
  justify-content: flex-end;
}
.hero__scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── EDITORIAL SECTIONS (text + portrait image) ─────────── */
.editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 5vw, 6rem);
  align-items: center;
}
.editorial--reverse { direction: rtl; }
.editorial--reverse > * { direction: ltr; }

.editorial__text { display: flex; flex-direction: column; gap: 2rem; }

.editorial__heading {
  font-family: var(--display); text-transform: uppercase;
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ivory);
}
.editorial__heading em { font-family: var(--display); text-transform: uppercase; font-weight: 300; font-style: italic; color: var(--accent-pale); }

.editorial__body {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ivory-dim);
  line-height: 1.8;
  max-width: 48ch;
}

.editorial__link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  transition: color 0.2s, gap 0.2s var(--ease);
  position: relative;
  padding-bottom: 0.25rem;
}
.editorial__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.editorial__link:hover { color: var(--ivory); gap: 1.5rem; }
.editorial__link:hover::after { transform: scaleX(1); }

/* ─── IMAGE PLACEHOLDERS ─────────────────────────────────── */
.ph {
  overflow: hidden;
  position: relative;
  background: var(--bg-light);
  border-radius: 6px;
}
.ph::before { content: ''; display: block; }
.ph--3-4::before  { padding-top: 133.33%; }
.ph--4-3::before  { padding-top: 75%; }
.ph--16-9::before { padding-top: 56.25%; }
.ph--1-1::before  { padding-top: 100%; }
.ph--wide::before { padding-top: 60%; }

.ph__inner {
  position: absolute;
  inset: 0;
  transition: transform 0.6s var(--ease);
}
.ph:hover .ph__inner { transform: scale(1.03); }

.ph__caption {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  font-size: var(--text-2xs);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  text-shadow: 0 1px 8px oklch(5% 0 0 / 0.8);
}

/* ─── HERO IMAGE (editorial-sized portrait) ──────────────── */
.editorial__img { position: relative; }

/* ─── CATEGORY STRIP ─────────────────────────────────────── */
.cat-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cat-strip__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cat-item {
  padding: 3.5rem clamp(2rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.3s var(--ease);
  position: relative;
}
.cat-item:last-child { border-right: none; }
.cat-item:hover { background: var(--bg-mid); box-shadow: inset 0 2px 0 var(--accent); }

.cat-item__label {
  font-size: var(--text-2xs);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}
.cat-item__title {
  font-family: var(--display); text-transform: uppercase;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ivory);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.cat-item__desc {
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--ivory-dim);
  line-height: 1.65;
  max-width: 28ch;
}
.cat-item__arrow {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  font-size: var(--text-xs);
  color: var(--ivory-dim);
  transition: color 0.2s, transform 0.2s var(--ease);
}
.cat-item:hover .cat-item__arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ─── PHOTO GRID ─────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}
.photo-grid__item {
  position: relative;
  overflow: hidden;
}
.photo-grid__item .ph__inner { transition: transform 0.7s var(--ease); }
.photo-grid__item:hover .ph__inner { transform: scale(1.05); }

/* Real photo images */
.ph__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s var(--ease);
}
.ph:hover .ph__img { transform: scale(1.04); }

/* Skeleton shimmer — shows until image loads */
@keyframes ph-shimmer {
  0%   { background-position: -300% 0; }
  100% { background-position: 300% 0; }
}
.ph--skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    oklch(20% 0 0 / 0.9) 50%,
    transparent 65%
  );
  background-size: 300% 100%;
  animation: ph-shimmer 2s linear infinite;
  z-index: 1;
}

.photo-grid__item--tall .ph::before { padding-top: 140%; }
.photo-grid__item--wide .ph::before { padding-top: 68%; }

.photo-grid__label {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: var(--text-2xs);
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: oklch(94% 0.008 80);
  text-shadow: 0 1px 8px oklch(5% 0 0 / 0.65);
  z-index: 1;
}

/* ─── SERVICES ───────────────────────────────────────────── */
.services-strip {
  padding-block: clamp(4rem, 6vw, 7rem);
}
.services-grid {
  margin-top: 3rem;
  display: grid;
  /* 10 services: 5×2 desktop, 2×5 below — both fill every row.
     Dividers are the 1px gap showing the grid background, so no
     per-child border rules. Keep the count a multiple of 10 (or of
     both column counts) or the last row shows a border-coloured hole. */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.svc {
  padding: 2.5rem 2rem;
  background: var(--bg-mid);
  transition: background 0.25s;
}
.svc__ico {
  display: block;
  width: 24px;
  height: 24px;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.svc:hover { background: var(--bg-light); }
@media (max-width: 1279px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.svc__name {
  font-family: var(--display); text-transform: uppercase;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ivory);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.svc__desc {
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--ivory-dim);
  line-height: 1.65;
}

/* ─── LOCATION ───────────────────────────────────────────── */
.location__header {
  margin-bottom: clamp(3rem, 5vw, 5rem);
}
.location__heading {
  font-family: var(--display); text-transform: uppercase;
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.location__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 5vw, 6rem);
  align-items: start;
}
.location__places {
  display: flex;
  flex-direction: column;
}
.loc-item {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.loc-item:first-child { border-top: 1px solid var(--border); }
.loc-item__dist {
  font-family: var(--serif);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--accent-pale);
  text-align: right;
  font-style: italic;
  white-space: nowrap;
}
.loc-item__unit {
  font-size: 0.55em;
  font-style: normal;
  margin-left: 0.15em;
  vertical-align: middle;
}
.loc-item__name {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ivory);
}
.loc-item__note {
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--ivory-faint);
  margin-top: 0.15rem;
}
.location__map-ph {
  width: 100%;
}
.location__address {
  margin-top: 2rem;
}
.location__addr-line {
  font-size: var(--text-xs);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ivory-dim);
  line-height: 1.8;
}
.location__directions-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1.5rem;
  transition: gap 0.2s var(--ease);
}
.location__directions-link:hover { gap: 1.2rem; }
.review {
  padding: 2.5rem 2.75rem;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}
.review:last-child { border-right: none; }
.review::before {
  content: '\201C';
  font-family: var(--serif);
  font-size: 5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.18;
  position: absolute;
  top: 1.25rem;
  left: 2rem;
  pointer-events: none;
}

      /* ─── STRUTTURA SORELLA ──────────────────────────────────── */
  .sister { text-align: center; }
  .sister .kicker { justify-content: center; }
  .sister__title {
    font-family: var(--display);
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-block: 0.75rem 1rem;
  }
  .sister__body {
    max-width: 56ch;
    margin-inline: auto;
    margin-bottom: 1.75rem;
  }

  /* ─── FINAL CTA ──────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding-block: clamp(3rem, 5vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.cta-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.07;
  pointer-events: none;
}
html[data-theme="dark"] .cta-section__bg { opacity: 0.12; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cta-section__bg { opacity: 0.12; }
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, oklch(18% 0 0 / 0.5) 0%, transparent 65%);
  pointer-events: none;
  opacity: 0;
}
html[data-theme="dark"] .cta-section::before { opacity: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cta-section::before { opacity: 1; }
}
.cta-section__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.cta-section__title {
  font-family: var(--display); text-transform: uppercase;
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ivory);
  max-width: 14ch;
}
.cta-section__title em {
  font-family: var(--display); text-transform: uppercase;
  font-weight: 300;
  font-style: italic;
  color: var(--accent-pale);
}
.cta-section__body {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ivory-dim);
  max-width: 50ch;
  line-height: 1.7;
}
.cta-section__actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.cta-section__guarantee {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-2xs);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}
.guarantee-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ─── RESPONSIVE — homepage sections ────────────────────── */

/* ── Large tablet / small desktop (≤1024px) ──────────────── */
@media (max-width: 1024px) {
  .photo-grid    { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .photo-grid__item:last-child { display: none; }
}

/* ── Small tablet / large phone (≤768px) ─────────────────── */
@media (max-width: 768px) {
  /* Keep editorial 2-col down to 640px, just tighten gap */
  .editorial { gap: clamp(1.5rem, 4vw, 3rem); }

  /* Location */
  .location__cols { grid-template-columns: minmax(0, 1fr); }
  .review { border-right: none; border-bottom: 1px solid var(--border); padding: 2rem 0; }
  .review:last-child { border-bottom: none; }
}

/* ── Mobile (≤640px) ─────────────────────────────────────── */
@media (max-width: 640px) {
  /* Hero */
  .hero__content {
    padding: 0 1.25rem 3.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .hero__meta { text-align: left; }

  /* Editorial: full single-column */
  .editorial { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .editorial--reverse { direction: ltr; }
  .editorial__text { gap: 1.25rem; }

  /* Portrait editorial images: use landscape ratio on mobile to save ~200px per section */
  .editorial__img .ph--3-4::before { padding-top: 75%; }

  /* Photo grid: single image, less tall */
  .photo-grid { grid-template-columns: minmax(0, 1fr); padding-inline: 1.5rem; }
  .photo-grid__item:nth-child(n+2) { display: none; }
  .photo-grid__item--tall .ph::before { padding-top: 80%; }
  .photo-grid__item { border-radius: 6px; }

  /* Category strip: collapse to 1-col on mobile */
  .cat-strip__inner { grid-template-columns: minmax(0, 1fr); }
  .cat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .cat-item:last-child { border-bottom: none; }

  /* Services: 2-col compact */
  .svc { padding: 1.25rem 1rem; }
  .svc__name { font-size: var(--text-base); }
  .services-strip { padding-block: clamp(2rem, 5vw, 3rem); }

  /* Location */
  .location__cols { grid-template-columns: minmax(0, 1fr); }

}
  /* — a11y: leggibilità corpo testo (contrasto WCAG AA + peso) — */
.editorial__body, .mag-card p, .mag-card__summary, .mag-route-card p, .faq-item__a, .answer-box__text, .mag-intro__text { color: var(--ivory); }
.editorial__body, .mag-card p, .mag-card__summary, .mag-route-card p, .faq-item__a, .answer-box__text { font-weight: 400; }
  
/* a11y-sweep: corpo testo leggibile (WCAG AA) */
.editorial__body, .editorial__text .editorial__text-p, .rooms-intro, .room-card__desc, .svc-split__text, .svc-extra-card p, .svc__desc, .cat-item__desc, .cta-section__body, .mag-intro__text, .mag-card p, .mag-card__summary, .mag-eat-card p, .mag-eat__intro, .mag-route-card p, .tour-partner p, .hta-card p { color: var(--ivory); }
.editorial__body, .editorial__text .editorial__text-p, .rooms-intro, .room-card__desc, .svc-split__text, .svc-extra-card p, .svc__desc, .cat-item__desc, .cta-section__body, .mag-intro__text, .mag-card p, .mag-card__summary, .mag-eat-card p, .mag-eat__intro, .mag-route-card p, .tour-partner p, .hta-card p { font-weight: 400; }
  
/* Due link nella sezione "Nel gruppo Civis" (Lilium + pagina Civis) */
.sister__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }

/* Hero: inquadratura del video del crepuscolo */
.hero__video { object-position: center 45%; }

  