/* ═══════════════════════════════════════════════════════════════
   DAL MASO — Homepage (front-page.php)
   Riusa .dm-az-* (azienda.css), .dm-bottle* (vini.css), .dm-post-card* (news.css).
   Palette: Verde #6A7854 · Ambra #C4843E · Testo #2F3624 · Avorio #FAF8F4
══════════════════════════════════════════════════════════════ */

/* ── Reset contenitore tema: la home gestisce da sé i margini ──────── */
body.home #content { padding: 0 !important; }
body.home #content .col-full { max-width: none; width: 100%; padding: 0; }
/* Niente banner-titolo (breadcrumb) sopra l'hero della home */
body.home .pavo-builder.after_header { display: none !important; }

/* ── Header trasparente "sopra la foto" ───────────────────────────── */
body.home #masthead.pavo-builder.header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.home { overflow-x: hidden; }
.dm-home * { box-sizing: border-box; }
.dm-home {
    font-family: 'Google Sans Flex', 'Helvetica Neue', Arial, sans-serif;
    color: #2F3624;
    background: #FAF8F4;
    margin: 0;
    overflow-x: hidden;
}
/* Titoli/eyebrow dell'hero: vanno sempre a capo (alcuni stili del tema
   forzano white-space:nowrap sui titoli) */
.dm-hero__title, .dm-hero__sub, .dm-hero .dm-az-eyebrow {
    white-space: normal !important;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* ═══ 1. HERO ═══════════════════════════════════════════════════════ */
.dm-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.dm-hero__slides { position: absolute; inset: 0; }
.dm-hero__slide {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.4s ease, transform 7s ease;
}
.dm-hero__slide.is-active { opacity: 1; transform: scale(1); }
.dm-hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(18,22,14,.58) 0%, rgba(18,22,14,.30) 38%, rgba(18,22,14,.72) 100%);
}
.dm-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;          /* evita lo overflow del flex item su mobile */
    max-width: 1100px;
    margin: 0 auto;
    padding: 130px 40px 90px;
    text-align: center;
}
.dm-hero__title {
    font-family: 'Kalnia', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2.8rem, 7vw, 6rem);
    line-height: 1.02;
    color: #fff;
    margin: 0 0 20px;
    text-shadow: 0 2px 26px rgba(18,22,14,.4);
}
.dm-hero__sub {
    font-size: clamp(1.05rem, 1.7vw, 1.4rem);
    line-height: 1.6;
    color: rgba(255,255,255,.92);
    max-width: 640px;
    margin: 0 auto 36px;
}
.dm-hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
/* Ghost button su sfondo scuro: bordo/testo bianchi */
.dm-hero__ghost {
    color: #fff;
    border-color: rgba(255,255,255,.7);
}
.dm-hero__ghost:hover { background: #fff; color: #2F3624; border-color: #fff; }

/* dots */
.dm-hero__dots {
    position: absolute;
    z-index: 3;
    left: 0; right: 0; bottom: 30px;
    display: flex;
    gap: 12px;
    justify-content: center;
}
.dm-hero__dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.8);
    background: transparent;
    padding: 0; cursor: pointer;
    transition: background .25s ease, transform .25s ease;
}
.dm-hero__dot.is-active { background: #fff; }
.dm-hero__dot:hover { transform: scale(1.2); }

/* Hamburger mobile bianco sopra la foto dell hero */
body.home .menu-mobile-nav-button .vineso-icon span { background: #fff !important; }
body.home .menu-mobile-nav-button { color: #fff !important; }

/* ═══ 2. STORIA — collage animato ═══════════════════════════════════ */
.dm-story {
    position: relative;
    max-width: none;
    margin: 0;
    padding: 104px 0 116px;
    display: grid;
    grid-template-columns: clamp(260px, 32vw, 520px) minmax(0, 1fr) clamp(230px, 28vw, 460px);
    align-items: center;
    gap: clamp(24px, 4vw, 80px);
    overflow: hidden;
}
.dm-story__sketch {
    position: absolute;
    left: 50%;
    bottom: 56px;
    width: min(940px, 84%);
    height: auto;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
}
.dm-story__inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 clamp(16px, 2.5vw, 40px);
}
.dm-story__eyebrow { display: inline-block; margin-bottom: 20px; }
.dm-story__title {
    font-family: 'Kalnia', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.9rem, 2.8vw, 3.1rem);
    line-height: 1.12;
    text-transform: uppercase;
    letter-spacing: .01em;
    color: #6A7854;
    margin: 0 0 34px;
}
.dm-story__cta { padding: 14px 30px; border-radius: 2px; }
.dm-story__cta span { display: inline-block; transition: transform .3s ease; }
.dm-story__cta:hover span { transform: translateX(5px); }

.dm-story__fig { position: relative; z-index: 1; margin: 0; width: 100%; }
.dm-story__fig img {
    width: 100%;
    display: block;
    border-radius: 5px;
    box-shadow: 0 34px 70px rgba(18,22,14,.26);
}
/* le foto riempiono le colonne laterali e arrivano a filo del bordo pagina;
   il piccolo margine negativo compensa l'inclinazione così coprono il bordo */
.dm-story__fig--left  { justify-self: stretch; margin-left: -44px; }
.dm-story__fig--left img  { aspect-ratio: 3 / 4.05; object-fit: cover; filter: contrast(1.02); }
.dm-story__fig--right { justify-self: stretch; align-self: center; margin-right: -44px; }
.dm-story__fig--right img { aspect-ratio: 4 / 5; object-fit: cover; }
.dm-story__year {
    position: absolute;
    left: clamp(20px, 2.4vw, 40px); bottom: -40px;
    font-family: 'Kalnia', Georgia, serif;
    font-weight: 600;
    font-size: clamp(3rem, 5.5vw, 5rem);
    line-height: 1;
    letter-spacing: .02em;
    color: #C4843E;
}

/* animazioni di entrata (attivate da .is-in via IntersectionObserver) */
.dm-story__fig { opacity: 0; transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.dm-story__fig--left  { transform: translateY(46px) rotate(-6deg) scale(.96); }
.dm-story__fig--right { transform: translateY(46px) rotate(6deg) scale(.96); }
.dm-story.is-in .dm-story__fig--left  { opacity: 1; transform: rotate(-3deg); }
.dm-story.is-in .dm-story__fig--right { opacity: 1; transform: rotate(2.5deg); }
.dm-story__fig--left:hover  { transform: rotate(-1.5deg) translateY(-8px) !important; }
.dm-story__fig--right:hover { transform: rotate(1.5deg)  translateY(-8px) !important; }

.dm-story__eyebrow,
.dm-story__title,
.dm-story__cta {
    opacity: 0; transform: translateY(22px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.dm-story.is-in .dm-story__eyebrow { opacity: 1; transform: none; transition-delay: .05s; }
.dm-story.is-in .dm-story__title   { opacity: 1; transform: none; transition-delay: .15s; }
.dm-story.is-in .dm-story__cta     { opacity: 1; transform: none; transition-delay: .28s; }
.dm-story__year {
    opacity: 0; transform: translateY(10px) scale(.8);
    transition: opacity .9s ease .5s, transform .9s cubic-bezier(.2,.7,.2,1) .5s;
}
.dm-story.is-in .dm-story__year { opacity: 1; transform: none; }

@media (max-width: 960px) {
    .dm-story {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        padding: 64px 0 80px;
        justify-items: stretch;
        align-items: end;
    }
    .dm-story__inner {
        order: -1;
        grid-column: 1 / -1;
        padding: 0 22px;
        margin-bottom: 8px;
    }
    .dm-story__sketch { display: none; }
    .dm-story__fig--left,
    .dm-story__fig--right { align-self: end; }
    .dm-story__year { bottom: -28px; font-size: clamp(2.4rem, 9vw, 3.6rem); }
}
@media (max-width: 520px) {
    .dm-story { grid-template-columns: 1fr; gap: 40px; }
    .dm-story__fig--left { margin-left: -14px; max-width: 86%; justify-self: start; }
    .dm-story__fig--right { margin-right: -14px; max-width: 78%; justify-self: end; }
}

/* ═══ 3. VINI — carosello ═══════════════════════════════════════════ */
.dm-home-vini {
    background: #fff;
    padding: 90px 0 80px;
    border-top: 1px solid #efe9dd;
    border-bottom: 1px solid #efe9dd;
}
.dm-home-vini .dm-az-section-head { margin-bottom: 48px; }
/* il carosello .dm-bottle* arriva da vini.css */
.dm-home-vini__cta { text-align: center; margin-top: 48px; }

/* ═══ 4. ACCOGLIENZA — visite in cantina (split animato) ════════════ */
.dm-visite {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    background: #fff;
    overflow: hidden;
}
.dm-visite__media { position: relative; overflow: hidden; min-height: 540px; }
.dm-visite__media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.12);
    transition: opacity 1.2s ease, transform 1.6s cubic-bezier(.2,.7,.2,1);
}
.dm-visite.is-in .dm-visite__media img { opacity: 1; transform: scale(1); }
.dm-visite__body {
    align-self: center;
    padding: 80px clamp(32px, 6vw, 96px);
    max-width: 640px;
}
.dm-visite__eyebrow { display: inline-block; margin-bottom: 20px; }
.dm-visite__title {
    font-family: 'Kalnia', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.06;
    text-transform: uppercase;
    color: #6A7854;
    margin: 0 0 24px;
}
.dm-visite__lead {
    font-size: 1.06rem;
    line-height: 1.8;
    color: #5b6150;
    margin: 0 0 34px;
}
.dm-visite__cta {
    background: #6A7854;
    color: #fff;
    padding: 15px 34px;
    border-radius: 2px;
    border: 1px solid #6A7854;
}
.dm-visite__cta span { display: inline-block; transition: transform .3s ease; }
.dm-visite__cta:hover { background: #C4843E; border-color: #C4843E; color: #fff; }
.dm-visite__cta:hover span { transform: translateX(5px); }

/* animazione testo a cascata */
.dm-visite__eyebrow,
.dm-visite__title,
.dm-visite__lead,
.dm-visite__cta {
    opacity: 0; transform: translateY(26px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.dm-visite.is-in .dm-visite__eyebrow { opacity: 1; transform: none; transition-delay: .15s; }
.dm-visite.is-in .dm-visite__title   { opacity: 1; transform: none; transition-delay: .27s; }
.dm-visite.is-in .dm-visite__lead    { opacity: 1; transform: none; transition-delay: .39s; }
.dm-visite.is-in .dm-visite__cta     { opacity: 1; transform: none; transition-delay: .51s; }

@media (max-width: 900px) {
    .dm-visite { grid-template-columns: 1fr; }
    .dm-visite__media { min-height: 320px; order: -1; }
    .dm-visite__body { padding: 56px 28px; max-width: none; }
}

/* ═══ 6. NEWS ═══════════════════════════════════════════════════════ */
.dm-home-news {
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 40px;
}
.dm-home-news__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
/* le .dm-post-card* arrivano da news.css */
.dm-home-news__cta { text-align: center; margin-top: 52px; }

/* ═══ Responsive ════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .dm-home-news__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .dm-hero { min-height: 86vh; }
    .dm-hero__inner { padding: 120px 22px 80px; }
    .dm-hero__title { font-size: 2.35rem; line-height: 1.08; overflow-wrap: break-word; }
    .dm-hero__sub { font-size: 1rem; }
    .dm-hero__actions { flex-direction: column; align-items: center; gap: 12px; }
    .dm-hero__actions .dm-az-btn { width: 100%; max-width: 320px; text-align: center; }
    .dm-home-news { padding: 64px 22px; }
    .dm-home-vini { padding: 64px 0 60px; }
    .dm-home-news__grid { grid-template-columns: 1fr; }
}
