/* ==========================================================
   PAGINE INFORMATIVE
   - pagine legali (privacy, termini, cookie): testo lungo e leggibile
   - card di esito centrata (conferma contatto, pagine di errore)
   ========================================================== */

/* ---------- Pagine legali ---------- */
.lg-page {
    padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.lg-crumb {
    padding-top: clamp(1.25rem, 3vw, 2rem);
}

.lg-layout {
    display: grid;
    /* ~70 caratteri per riga di testo, piu' il padding della card */
    grid-template-columns: minmax(0, calc(70ch + 6rem)) minmax(220px, 280px);
    justify-content: start;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.lg-body {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 0 var(--line);
    padding: clamp(1.5rem, 4vw, 3rem);
    color: var(--ink);
}

.lg-body section + section {
    margin-top: 2.25rem;
    padding-top: 2.25rem;
    border-top: 1px solid var(--line);
}

/* Le ancore non devono finire sotto l'header fisso */
.lg-body section {
    scroll-margin-top: 110px;
}

.lg-body h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.75rem);
    font-weight: 400;
    margin-bottom: 0.85rem;
}

.lg-body h3 {
    font-size: 1.15rem;
    font-weight: 500;
    margin: 1.25rem 0 0.5rem;
}

.lg-body p,
.lg-body li {
    font-size: 1.0125rem;
    line-height: 1.7;
    color: var(--ink);
}

.lg-body p + p,
.lg-body ul + p,
.lg-body p + ul {
    margin-top: 0.9rem;
}

.lg-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.lg-body li {
    position: relative;
    padding-left: 1.4rem;
}

/* Puntino oro come dettaglio decorativo */
.lg-body li::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0.72em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
}

.lg-body a {
    color: var(--forest);
    text-underline-offset: 3px;
}

/* Indice laterale, fisso durante lo scorrimento su desktop */
.lg-aside {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lg-toc {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-left: 1rem;
    border-left: 1px solid var(--line-strong);
}

.lg-toc .r-eyebrow {
    margin-bottom: 0.5rem;
}

.lg-toc a {
    color: var(--moss);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.35rem 0;
    line-height: 1.35;
}

.lg-toc a:hover {
    color: var(--ink);
}

.lg-help {
    background: var(--sage);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--forest-dark);
}

.lg-help strong {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--ink);
}

.lg-help .r-link-arrow {
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

@media (max-width: 980px) {
    .lg-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Su schermi stretti l'indice sparisce e il box domande va in fondo */
    .lg-aside {
        position: static;
    }

    .lg-toc {
        display: none;
    }
}

/* ---------- Card di esito (conferma / errore) ---------- */
.rs-page {
    display: flex;
    justify-content: center;
    padding: clamp(2.5rem, 8vw, 6rem) 0 clamp(3rem, 8vw, 6rem);
}

.rs-card {
    width: 100%;
    max-width: 560px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 0 var(--line);
    padding: clamp(1.75rem, 5vw, 3rem);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.rs-card--wide {
    max-width: 640px;
}

.rs-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-pill);
    background: var(--sage);
    color: var(--forest);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.rs-icon .r-icon {
    width: 32px;
    height: 32px;
}

.rs-icon--warn {
    background: var(--gold-soft);
    color: var(--gold-deep);
}

.rs-card h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    font-weight: 400;
}

.rs-text {
    color: var(--moss);
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 44ch;
}

.rs-code {
    margin-top: -0.25rem;
}

.rs-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.rs-help {
    font-size: 0.875rem;
    color: var(--moss);
    margin-top: 0.25rem;
}

/* Elenco degli errori di validazione */
.rs-errors {
    width: 100%;
    text-align: left;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--danger-soft);
    color: var(--danger-dark);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

@media (max-width: 480px) {
    .rs-actions {
        flex-direction: column;
        width: 100%;
    }

    .rs-actions .r-btn {
        width: 100%;
    }
}

/* ==========================================================
   CHI SIAMO (about.html)
   ========================================================== */
.ab-page {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 6vw, 4.5rem);
    padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.ab-page .r-page-head {
    margin-bottom: 0;
}

.ab-story {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--sage);
    border-radius: clamp(22px, 3vw, 32px);
    overflow: hidden;
}

/* Alta quanto il testo accanto (la larghezza la decide la colonna) */
.ab-story__media {
    height: 100%;
    min-height: 360px;
}

.ab-story__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: clamp(1.75rem, 5vw, 4rem);
}

.ab-story__text h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    font-weight: 400;
}

.ab-story__text p {
    color: var(--moss);
    line-height: 1.7;
    max-width: 34rem;
}

.ab-claim {
    display: flex;
    flex-direction: column;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--forest) !important;
}

.ab-values-wrap {
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 3vw, 2rem);
}

.ab-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.ab-value {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 1px 0 var(--line);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ab-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;
}

.ab-value h3 {
    font-size: 1.15rem;
    font-weight: 500;
}

.ab-value p {
    color: var(--moss);
    font-size: 0.925rem;
    line-height: 1.6;
}

.ab-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;
}

.ab-cta > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 34rem;
}

.ab-cta h2 {
    color: #fff;
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    font-weight: 400;
}

.ab-cta p {
    color: #D6E0D3;
    line-height: 1.6;
}

.ab-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Pulsante chiaro sul fondo verde */
.ab-cta .ab-cta__ghost {
    color: #fff;
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6);
}

.ab-cta .ab-cta__ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.ab-company {
    color: var(--moss);
    font-size: 0.875rem;
    margin-top: -1.5rem;
}

@media (max-width: 1024px) {
    .ab-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .ab-story { grid-template-columns: 1fr; }
    .ab-story__media { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
}

@media (max-width: 520px) {
    .ab-values { grid-template-columns: 1fr; }
    .ab-cta__actions,
    .ab-cta__actions .r-btn { width: 100%; }
}

/* ==========================================================
   LA NOSTRA STORIA (story.html): capitoli con foto e testo
   alternati (foto a sinistra nei dispari, a destra nei pari).
   L'invito finale riusa .ab-cta di Chi siamo.
   ========================================================== */
.st-page {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 6vw, 4.5rem);
    padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.st-page .r-page-head {
    margin-bottom: 0;
}

.st-head h1 {
    max-width: 18ch;
}

.st-chapters {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(3rem, 8vw, 6.5rem);
}

.st-chapter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.st-chapter:nth-child(even) .st-chapter__media {
    order: 2;
}

.st-chapter__media {
    aspect-ratio: 16 / 10;
    border-radius: clamp(20px, 3vw, 28px);
}

.st-chapter__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

/* Numero del capitolo in oro, seguito da un filo sottile */
.st-chapter__num {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    line-height: 1;
    color: var(--gold-text);
}

.st-chapter__num::after {
    content: "";
    width: 56px;
    height: 1px;
    background: var(--gold);
    opacity: 0.6;
}

.st-chapter__text h2 {
    font-size: clamp(2rem, 3.6vw, 2.75rem);
    font-weight: 400;
    line-height: 1.1;
}

.st-chapter__text p {
    color: var(--moss);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 34rem;
}

/* Sottotitolo e frase finale: stesso corsivo verde di "alla pelle." in home */
.st-chapter__text .st-chapter__sub,
.st-chapter__text .st-chapter__claim {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    line-height: 1.45;
    color: var(--forest);
}

.st-chapter__text .r-btn {
    margin-top: 0.5rem;
}

@media (max-width: 800px) {
    /* Su telefono sempre prima la foto, poi il testo */
    .st-chapter { grid-template-columns: 1fr; gap: 1.5rem; }
    .st-chapter:nth-child(even) .st-chapter__media { order: 0; }
}

@media (max-width: 520px) {
    .st-chapter__text .r-btn { width: 100%; }
}

/* ==========================================================
   DOMANDE FREQUENTI (faq.html): domande apribili
   ========================================================== */
.fq-body h2 {
    margin-bottom: 0.25rem;
}

.fq-item {
    border-bottom: 1px solid var(--line);
}

.fq-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 58px;
    padding: 0.75rem 0;
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
}

.fq-item summary::-webkit-details-marker {
    display: none;
}

.fq-item summary .r-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.fq-item[open] summary .r-icon {
    transform: rotate(180deg);
}

.fq-item p {
    padding-bottom: 1rem;
    color: var(--moss) !important;
}

.fq-item p + p {
    margin-top: -0.5rem;
}

/* Modulo tipo di recesso (terms.html): riquadro da copiare */
.lg-form {
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface-alt);
}

.lg-body .lg-form p + p {
    margin-top: 0.6rem;
}

.lg-body .lg-form__note {
    color: var(--moss);
    font-size: 0.9rem;
}
