/* DIFILL B — componenti della home riusati da Chi siamo, Contatti e 404.
   Si carica sulla home e sulle pagine disegnate dal tema. */

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lift { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes glowIn { from { opacity: 0; transform: translateX(-50%) scale(.85); } to { opacity: 1; transform: translateX(-50%) scale(1); } }

/* ---------- sezioni ---------- */
.dfl-section { padding-block: var(--section); }
.dfl-slab-light { background: var(--avorio); color: var(--antracite); }
.dfl-slab-alt { background: var(--avorio-2); }
.dfl-stone { background: url("../img/grana-pietra.webp") 0 0 / 256px 256px, var(--piperno); color: var(--avorio); }
.dfl-slab-light .dfl-head p { color: var(--grigio); }

.dfl-kicker { color: var(--oro-chiaro); font-size: .9375rem; font-stretch: 110%; letter-spacing: .02em; }

/* bagliore dietro gli oggetti su pietra lavica */
.dfl-glow {
  position: absolute; left: 50%; top: 2%; width: 150%; aspect-ratio: 1; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(226, 205, 160, .30), rgba(205, 187, 151, .10) 46%, transparent 72%);
  pointer-events: none;
}

/* ---------- testo di presentazione ---------- */
.dfl-statement {
  font-weight: 300; font-stretch: 112%;
  font-size: clamp(1.55rem, 1rem + 2.1vw, 2.85rem); line-height: 1.22; letter-spacing: -0.015em;
  max-width: 25em; text-wrap: pretty;
}
@media (prefers-reduced-motion: no-preference) {
  .js .dfl-statement[data-reveal] { opacity: 0; transition: opacity 1.4s var(--ease); }
  .js .dfl-statement[data-reveal].is-in { opacity: 1; }
}

/* ---------- elenco delle categorie ---------- */
.dfl-legend { margin-top: 48px; display: grid; gap: 18px; }
.dfl-legend-title { font-weight: 500; font-stretch: 110%; font-size: 1rem; color: var(--oro-chiaro); }
.dfl-legend ul { display: grid; grid-template-columns: 1fr; }
.dfl-legend a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 2px; text-decoration: none; border-bottom: 1px solid rgba(173, 148, 103, .28); transition: color .3s, border-color .3s; }
.dfl-legend a:hover { color: var(--oro-chiaro); border-bottom-color: var(--oro); }
.dfl-legend .dfl-n { color: var(--oro-chiaro); font-variant-numeric: tabular-nums; }
@media (min-width: 600px) { .dfl-legend ul { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
@media (min-width: 1024px) { .dfl-legend { grid-template-columns: 220px 1fr; align-items: start; } .dfl-legend ul { grid-template-columns: repeat(3, 1fr); column-gap: 40px; } }
/* su lastra chiara l'oro del testo diventa oro scuro */
.dfl-slab-light .dfl-legend { margin-top: 0; }
.dfl-slab-light .dfl-legend-title, .dfl-slab-light .dfl-legend .dfl-n { color: var(--oro-ink); }
.dfl-slab-light .dfl-legend a { border-bottom-color: var(--bordo-chiaro); }
.dfl-slab-light .dfl-legend a:hover { color: var(--oro-ink); border-bottom-color: var(--oro); }

/* ---------- banda fotografica a tutta larghezza (compare solo se c'e' una foto) ---------- */
.dfl-band { position: relative; height: clamp(340px, 50vw, 620px); border-block: 1px solid var(--giunto); background: var(--piperno); overflow: hidden; }
.dfl-band img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- griglia a quattro con giunti in ottone ---------- */
.dfl-grid4 { display: grid; gap: 1px; background: var(--giunto); border: 1px solid var(--giunto); }
.dfl-grid4 li { background: var(--piperno); padding: clamp(28px, 3.4vw, 44px); display: grid; gap: 10px; align-content: start; }
.dfl-grid4 svg { width: 28px; height: 28px; color: var(--oro); margin-bottom: 8px; }
.dfl-grid4 h3 { font-weight: 500; font-stretch: 112%; font-size: 1.25rem; }
.dfl-grid4 p { color: var(--testo-2); max-width: 30em; }
@media (min-width: 768px) { .dfl-grid4 { grid-template-columns: 1fr 1fr; } }

/* ---------- due porte ---------- */
.dfl-doors { display: grid; }
.dfl-door {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: clamp(280px, 32vw, 440px); padding: clamp(28px, 4vw, 64px) var(--gutter);
  text-decoration: none; transition: background-color .5s var(--ease);
}
.dfl-door-kicker { font-weight: 500; font-stretch: 110%; font-size: .9375rem; }
.dfl-door-title { font-weight: 300; font-stretch: 125%; font-size: clamp(1.9rem, 1rem + 2.8vw, 3.4rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 12em; }
.dfl-door-go { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; font-stretch: 110%; }
.dfl-door-go svg { width: 22px; height: 22px; transition: transform .5s var(--ease); }
.dfl-door:hover .dfl-door-go svg, .dfl-door:focus-visible .dfl-door-go svg { transform: translateX(8px); }
.dfl-door-light { background: var(--avorio); color: var(--antracite); }
.dfl-door-light .dfl-door-kicker { color: var(--oro-ink); }
.dfl-door-light:hover { background: #EAE4D9; }
.dfl-door-gold { background: var(--oro); color: var(--lavica); }
.dfl-door-gold:hover { background: #B8A073; }
@media (min-width: 768px) { .dfl-doors { grid-template-columns: 1fr 1fr; } }

/* ---------- telefono e colonne dei contatti ---------- */
.dfl-phone {
  display: inline-block; margin: 28px 0 clamp(48px, 6vw, 80px);
  font-weight: 300; font-stretch: 125%; font-size: min(calc((100vw - 2 * var(--gutter)) / 7.5), 9.4rem); line-height: 1; letter-spacing: -0.04em; white-space: nowrap;
  text-decoration: none; font-variant-numeric: tabular-nums; transition: color .4s var(--ease);
}
.dfl-phone:hover { color: var(--oro-chiaro); }
.dfl-contact-cols { display: grid; gap: 32px; }
.dfl-contact-cols :is(h2, h3) { font-weight: 500; font-stretch: 110%; font-size: 1rem; color: var(--oro-chiaro); margin: 18px 0 8px; }
.dfl-contact-cols p { color: #D6CFC2; margin-bottom: 10px; }
@media (min-width: 900px) { .dfl-contact-cols { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
