/* ==========================================================
   HOME (pubblica e con account)
   ========================================================== */

.h-section {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.25rem);
    padding-top: clamp(3rem, 7vw, 5.5rem);
}

/* ---------- Hero ---------- */
.h-hero {
    position: relative;
    padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem);
    overflow: hidden;
}

.h-hero__grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    position: relative;
    z-index: 1;
}

.h-hero__text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.h-hero__title {
    font-size: clamp(2.6rem, 6vw, 4.75rem);
    line-height: 1.02;
    font-weight: 400;
    display: flex;
    flex-direction: column;
}

.h-hero__title em {
    font-style: italic;
    color: var(--forest);
}

.h-hero__lead {
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    line-height: 1.65;
    color: var(--moss);
    max-width: 30rem;
}

.h-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.h-hero__media {
    aspect-ratio: 16 / 10;
    border-radius: clamp(20px, 3vw, 28px);
}

.h-hero__wm {
    width: 28%;
}

.h-hero__thread {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(0.5rem, 3vw, 2.25rem);
    width: 100%;
    height: 120px;
    pointer-events: none;
}

.h-hero__thread path {
    fill: none;
    stroke: var(--gold);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

/* ---------- Bentornato ---------- */
.h-welcome {
    background: var(--surface);
    border-radius: 22px;
    box-shadow: 0 1px 0 var(--line);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
}

.h-welcome__who {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.h-welcome__who > div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.h-welcome__who strong {
    font-size: 1rem;
}

.h-welcome__who .r-muted {
    font-size: 0.875rem;
}

.h-welcome__icon,
.h-value__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-pill);
    background: var(--sage);
    color: var(--forest);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.h-welcome__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* ---------- Punti di forza ---------- */
.h-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem 2rem;
    padding-top: clamp(2.5rem, 5vw, 4rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
}

.h-value {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.h-value > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.h-value strong {
    font-size: 0.95rem;
}

.h-value span:not(.h-value__icon) {
    color: var(--moss);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ---------- Collezioni ---------- */
.h-collections {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.h-collections--2 .h-collection__media { aspect-ratio: 4 / 3; }
.h-collections--1 { grid-template-columns: 1fr; }
.h-collections--1 .h-collection__media { aspect-ratio: 21 / 9; }
.h-collections--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.h-collection {
    position: relative;
    display: block;
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
}

.h-collection__media {
    aspect-ratio: 3 / 4;
}

.h-collection__media .r-media__img {
    transition: transform 0.6s ease;
}

.h-collection:hover .h-collection__media .r-media__img {
    transform: scale(1.04);
}

.h-collection__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    min-height: 45%;
    background: linear-gradient(180deg, rgba(22, 32, 27, 0) 0%, rgba(22, 32, 27, 0.6) 100%);
}

.h-collection__name {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    color: #fff;
    line-height: 1.1;
}

.h-collection__go {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-pill);
    background: var(--paper);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.h-collection:hover .h-collection__go {
    transform: translateX(3px);
}

/* ---------- Storia ---------- */
.h-story {
    background: var(--sage);
    border-radius: clamp(22px, 3vw, 32px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.h-story__media {
    min-height: 100%;
    aspect-ratio: 1 / 1;
}

.h-story__text {
    padding: clamp(2rem, 5vw, 4.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.25rem;
}

.h-story__logo {
    width: 64px;
    height: 64px;
}

.h-story__text h2 {
    font-size: clamp(2rem, 3.6vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
}

.h-story__text p {
    color: var(--moss);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 30rem;
}

/* ---------- Novita' ---------- */
.h-news {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.h-news__item {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: 0 1px 0 var(--line);
}

.h-news__item h3 {
    font-size: 1.35rem;
}

.h-news__item p {
    color: var(--moss);
    line-height: 1.6;
}

.h-news__date {
    margin-top: auto;
    font-size: 0.8125rem;
    color: var(--moss);
}

/* ---------- Invito finale ---------- */
.h-cta {
    background: var(--forest);
    color: #fff;
    border-radius: clamp(22px, 3vw, 32px);
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 4rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem 2.5rem;
    flex-wrap: wrap;
}

.h-cta > div {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 34rem;
}

.h-cta h2 {
    color: #fff;
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    font-weight: 400;
}

.h-cta p {
    color: #D6E0D3;
    line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .h-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .h-hero__grid { grid-template-columns: 1fr; }
    .h-hero__media-wrap { order: -1; }
    .h-hero__media { aspect-ratio: 4 / 5; max-height: 70vh; width: 100%; }
    .h-hero__thread { display: none; }
    .h-collections,
    .h-collections--2 { grid-template-columns: 1fr; }
    .h-collection__media { aspect-ratio: 16 / 10; }
    .h-story { grid-template-columns: 1fr; }
    .h-story__media { aspect-ratio: 16 / 10; }
}

@media (max-width: 520px) {
    .h-values { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .h-value { flex-direction: column; background: var(--surface); border-radius: 16px; padding: 1rem; gap: 0.6rem; }
    .h-value span:not(.h-value__icon) { display: none; }
    .h-value__icon { width: 40px; height: 40px; }
    .h-hero__actions .r-btn { flex: 1 1 100%; }
}
