/* DIFILL B — home page. Si carica solo sulla pagina iniziale, dopo components.css. */

/* ---------- hero ---------- */
.dfl-hero {
  position: relative; overflow: hidden;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--header-h) + 24px);
  background:
    radial-gradient(90% 70% at 78% 30%, rgba(205, 187, 151, .10), transparent 60%),
    url("../img/grana-pietra.webp") 0 0 / 256px 256px,
    var(--lavica);
}
.dfl-hero-inner { display: grid; gap: 40px; padding-bottom: 36px; }
.dfl-hero-title {
  font-weight: 300; font-stretch: 125%;
  font-size: min(14.4vw, 7rem); line-height: .96; letter-spacing: -0.035em;
  margin: 20px 0 28px;
}
.dfl-hero-title .dfl-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.dfl-hero-title .dfl-line > span { display: inline-block; }
.dfl-hero .dfl-actions { margin-top: 34px; }
@media (max-width: 599px) { .dfl-hero .dfl-btn { flex: 1 1 100%; } }

.dfl-hero-object { position: relative; justify-self: center; display: grid; justify-items: center; width: min(78vw, 420px); }
.dfl-hero-object img { position: relative; width: 100%; height: auto; }
.dfl-hero-object figcaption { margin-top: 18px; font-size: .8125rem; color: var(--testo-2); justify-self: start; }

.dfl-hero-facts { display: grid; gap: 18px; padding-block: 0 36px; color: #CFC8BB; font-size: .9375rem; }
.dfl-hero-facts .dfl-joint { margin-bottom: 14px; }

@media (min-width: 1024px) {
  .dfl-hero-inner { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; padding-bottom: 56px; }
  .dfl-hero-copy { grid-column: 1 / span 7; padding-bottom: 12px; }
  .dfl-hero-title { font-size: clamp(4.5rem, 8.6vw, 7.9rem); }
  .dfl-hero-object { grid-column: 8 / span 5; width: auto; align-self: end; }
  .dfl-hero-object img { height: min(60svh, 600px); width: auto; }
  .dfl-hero-facts { grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 44px; }
}

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes drift { to { transform: translateY(-64px); } }
@media (prefers-reduced-motion: no-preference) {
  .js .dfl-hero-title .dfl-line > span { animation: rise 1.2s var(--ease) .15s both; }
  .js .dfl-hero-title .dfl-line:nth-child(2) > span { animation-delay: .3s; }
  .js .dfl-hero .dfl-kicker, .js .dfl-hero .dfl-lead, .js .dfl-hero .dfl-actions { animation: fade 1s var(--ease) .6s both; }
  .js .dfl-hero-object img { animation: lift 1.6s var(--ease) .1s both; }
  .js .dfl-glow { animation: glowIn 2.4s var(--ease) .4s both; }
  .js .dfl-hero-object figcaption { animation: fade 1s var(--ease) 1.2s both; }
  /* parallasse leggerissima, solo dove esistono le scroll-driven animations (nessun JS) */
  @supports (animation-timeline: scroll()) {
    .js .dfl-hero-object { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  }
}

/* ---------- presentazione (lastra chiara) ---------- */
.dfl-about { padding-block: var(--section); }
.dfl-pillars { display: grid; gap: 36px; margin-top: clamp(56px, 7vw, 104px); }
.dfl-pillars h3 { font-weight: 400; font-stretch: 125%; font-size: 1.5rem; letter-spacing: -0.01em; margin: 22px 0 10px; }
.dfl-pillars p { color: var(--grigio); max-width: 26em; }
@media (min-width: 900px) { .dfl-pillars { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

/* ---------- catalogo: griglia con giunti in ottone ---------- */
.dfl-catalog { padding-block: var(--section); }
.dfl-tiles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 1px;
  background: var(--giunto); border: 1px solid var(--giunto);
}
.dfl-tile { background: var(--piperno); min-height: 250px; }
.dfl-tile a {
  position: relative; display: grid; grid-template-rows: auto 1fr auto auto; height: 100%;
  padding: 20px; text-decoration: none; overflow: hidden;
  transition: background-color .5s var(--ease);
}
.dfl-tile-count { font-weight: 300; font-stretch: 100%; font-size: 1.5rem; color: var(--oro-chiaro); font-variant-numeric: tabular-nums; line-height: 1; }
.dfl-tile-name { font-weight: 400; font-stretch: 125%; font-size: clamp(1.35rem, 1rem + 1.3vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.05; z-index: 1; }
.dfl-tile-note { font-size: .875rem; color: var(--testo-2); margin-top: 6px; z-index: 1; }
.dfl-tile img {
  grid-row: 2; justify-self: center; align-self: center;
  max-height: 150px; width: auto; margin-block: 16px;
  transition: transform 1s var(--ease), opacity 1s var(--ease);
}
.dfl-tile a:hover, .dfl-tile a:focus-visible { background: var(--piperno-2); }
.dfl-tile a:hover img, .dfl-tile a:focus-visible img { transform: scale(1.05); }
.dfl-tile-cornici, .dfl-tile-lettere, .dfl-tile-chiavarde { grid-column: 1 / -1; }
.dfl-tile-lettere img, .dfl-tile-chiavarde img { max-height: none; max-width: 78%; }

@media (min-width: 1024px) {
  .dfl-tiles { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 560px 300px; }
  .dfl-tile { min-height: 0; }
  .dfl-tile a { padding: 32px; }
  .dfl-tile-cornici { grid-column: 1 / span 5; grid-row: 1; }
  .dfl-tile-lampade { grid-column: 6 / span 3; grid-row: 1; }
  .dfl-tile-portafiori { grid-column: 9 / span 4; grid-row: 1; }
  .dfl-tile-lettere { grid-column: 1 / span 7; grid-row: 2; }
  .dfl-tile-chiavarde { grid-column: 8 / span 5; grid-row: 2; }
  .dfl-tile img { max-height: 340px; }
  .dfl-tile-lampade img { max-height: 300px; }
  .dfl-tile-lettere a, .dfl-tile-chiavarde a { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr auto; }
  .dfl-tile-lettere .dfl-tile-count, .dfl-tile-chiavarde .dfl-tile-count { grid-column: 1; grid-row: 1; }
  .dfl-tile-lettere .dfl-tile-name, .dfl-tile-chiavarde .dfl-tile-name { grid-column: 1; grid-row: 3; align-self: end; }
  .dfl-tile-lettere .dfl-tile-note, .dfl-tile-chiavarde .dfl-tile-note { grid-column: 1; grid-row: 4; }
  .dfl-tile-lettere img, .dfl-tile-chiavarde img { grid-column: 2; grid-row: 1 / span 4; max-width: 100%; max-height: 200px; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .dfl-tile img:not(.is-in) { opacity: 0; transform: scale(1.06); }
}

/* ---------- prodotti: striscia scorrevole ---------- */
.dfl-products { padding-block: var(--section); background: var(--avorio-2); }
.dfl-products .dfl-head { margin-bottom: 36px; }
.dfl-head-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.dfl-strip-controls { display: flex; gap: 10px; }
.dfl-round {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--antracite); background: transparent; color: var(--antracite); cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), opacity .35s;
}
.dfl-round svg { width: 22px; height: 22px; }
.dfl-round:hover { background: var(--antracite); color: var(--avorio); }
.dfl-round[disabled] { opacity: .3; cursor: default; background: transparent; color: var(--antracite); }
.dfl-strip {
  --edge: max(var(--gutter), (100vw - var(--maxw)) / 2);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  padding-inline: var(--edge); scrollbar-width: thin; scrollbar-color: var(--oro) transparent;
  overscroll-behavior-x: contain;
}
.dfl-strip:focus-visible { outline-offset: -4px; }
.dfl-strip-list { display: flex; gap: 18px; width: max-content; padding-bottom: 28px; }
.dfl-card { flex: 0 0 clamp(230px, 72vw, 300px); scroll-snap-align: start; }
.dfl-card a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.dfl-card-panel { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--pannello); margin-bottom: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .5s var(--ease); }
.dfl-card-panel img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 64%; max-height: 72%; mix-blend-mode: multiply; transition: transform 1s var(--ease); }
.dfl-card-name { font-weight: 500; font-stretch: 110%; font-size: 1.0625rem; line-height: 1.3; }
.dfl-card-meta { font-size: .875rem; color: var(--grigio); }
.dfl-card-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.dfl-card a:hover .dfl-card-panel, .dfl-card a:focus-visible .dfl-card-panel { box-shadow: inset 0 0 0 1px var(--oro); }
.dfl-card a:hover img, .dfl-card a:focus-visible img { transform: scale(1.05); }
@media (min-width: 1024px) { .dfl-card { flex-basis: clamp(260px, 22vw, 320px); } .dfl-strip-list { gap: 24px; } }

/* ---------- materia ---------- */
.dfl-materials { padding-block: var(--section); }
.dfl-matter li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "joint joint" "word img" "text img"; column-gap: 24px; padding-bottom: 28px; }
.dfl-matter .dfl-joint { grid-area: joint; margin-bottom: 22px; }
.dfl-matter-word { grid-area: word; font-weight: 300; font-stretch: 125%; font-size: clamp(3rem, 1.4rem + 7vw, 8.5rem); line-height: .95; letter-spacing: -0.04em; }
.dfl-matter p { grid-area: text; color: var(--testo-2); max-width: 24em; margin-top: 12px; }
.dfl-matter-plate { grid-area: img; align-self: center; position: relative; width: 116px; aspect-ratio: 4 / 5; background: var(--avorio-2); }
.dfl-matter-plate img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 70%; max-height: 76%; mix-blend-mode: multiply; }
@media (min-width: 900px) {
  .dfl-matter li { grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "joint joint joint" "word text img"; align-items: center; padding-bottom: 34px; }
  .dfl-matter p { margin: 0; }
  .dfl-matter-plate { justify-self: end; width: 168px; }
}

/* ---------- servizi ---------- */
.dfl-services { padding-block: var(--section); background: url("../img/grana-pietra.webp") 0 0 / 256px 256px, var(--piperno); }

/* ---------- contatti ---------- */
.dfl-contact { padding-block: var(--section); }

