
/* =========================================================
   PAGINE LEGALI — A.G.E. PROJECT
========================================================= */

body.legal-page {
    overflow-x: clip;
    overflow-y: auto;
    background: #050505;
}

.legal-page .footer-policy a[aria-current="page"] {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.legal-main {
    min-width: 0;
    overflow: clip;
    background:
        radial-gradient(circle at 85% 10%, rgba(193, 18, 31, 0.10), transparent 30%),
        #050505;
}

.legal-shell {
    width: min(calc(100% - 64px), 1320px);
    margin-inline: auto;
}

.legal-kicker {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.20em;
    text-transform: uppercase;
}

/* HERO */

.legal-hero {
    position: relative;
    padding: 178px 0 82px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.legal-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.legal-hero-inner {
    position: relative;
    z-index: 1;
}

.legal-hero h1 {
    max-width: 1020px;
    margin: 0;
    color: #fff;
    font-size: clamp(3.15rem, 7vw, 7.2rem);
    font-weight: 570;
    line-height: 0.92;
    letter-spacing: -0.062em;
    text-wrap: balance;
}

.legal-hero-copy {
    max-width: 760px;
    margin: 30px 0 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.72;
}

.legal-meta {
    margin-top: 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-meta span {
    min-height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    color: rgba(255,255,255,0.66);
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 650;
}

/* LAYOUT */

.legal-content {
    padding: clamp(78px, 8vw, 126px) 0 clamp(110px, 11vw, 170px);
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(250px, 0.36fr) minmax(0, 1fr);
    gap: clamp(58px, 8vw, 118px);
    align-items: start;
}

.legal-sidebar {
    position: sticky;
    top: 112px;
}

.legal-sidebar-title {
    display: block;
    margin-bottom: 18px;
    color: rgba(255,255,255,0.38);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.legal-toc {
    display: grid;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.legal-toc a {
    min-height: 52px;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: rgba(255,255,255,0.58);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    font-size: 0.84rem;
    line-height: 1.35;
    transition: color 180ms ease, padding-left 180ms ease;
}

.legal-toc a::after {
    content: "↘";
    flex: 0 0 auto;
    color: rgba(255,255,255,0.28);
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
    padding-left: 8px;
    color: #fff;
}

.legal-contact-card {
    margin-top: 28px;
    padding: 22px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 18px;
}

.legal-contact-card strong,
.legal-contact-card span,
.legal-contact-card a {
    display: block;
}

.legal-contact-card strong {
    margin-bottom: 10px;
    color: #fff;
    font-size: 0.88rem;
}

.legal-contact-card span,
.legal-contact-card a {
    color: rgba(255,255,255,0.53);
    font-size: 0.78rem;
    line-height: 1.62;
}

.legal-contact-card a:hover {
    color: #fff;
}

/* ARTICLE */

.legal-article {
    min-width: 0;
}

.legal-intro {
    margin-bottom: 42px;
    padding: clamp(24px, 3vw, 34px);
    color: rgba(255,255,255,0.67);
    background:
        linear-gradient(135deg, rgba(193,18,31,0.11), rgba(255,255,255,0.025));
    border: 1px solid rgba(193,18,31,0.24);
    border-radius: 22px;
    font-size: 0.95rem;
    line-height: 1.72;
}

.legal-section {
    scroll-margin-top: 110px;
    padding: 0 0 54px;
    margin: 0 0 54px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    margin: 0 0 24px;
    color: #fff;
    font-size: clamp(1.9rem, 3vw, 3rem);
    font-weight: 570;
    line-height: 1.04;
    letter-spacing: -0.042em;
    text-wrap: balance;
}

.legal-section h3 {
    margin: 34px 0 12px;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
}

.legal-section p,
.legal-section li,
.legal-table td,
.legal-table th {
    color: rgba(255,255,255,0.64);
    font-size: 0.94rem;
    line-height: 1.76;
}

.legal-section p {
    margin: 0;
}

.legal-section p + p {
    margin-top: 16px;
}

.legal-section ul,
.legal-section ol {
    margin: 18px 0 0;
    padding-left: 22px;
}

.legal-section li + li {
    margin-top: 10px;
}

.legal-section strong {
    color: rgba(255,255,255,0.90);
}

.legal-section a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.34);
    text-underline-offset: 4px;
}

.legal-callout {
    margin-top: 24px;
    padding: 22px 24px;
    background: rgba(255,255,255,0.035);
    border-left: 3px solid var(--accent);
    border-radius: 0 14px 14px 0;
}

.legal-callout p {
    color: rgba(255,255,255,0.70);
}

.legal-table-wrap {
    width: 100%;
    margin-top: 24px;
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
}

.legal-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: rgba(255,255,255,0.02);
}

.legal-table th,
.legal-table td {
    padding: 18px 20px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255,255,255,0.09);
}

.legal-table th {
    color: rgba(255,255,255,0.86);
    background: rgba(255,255,255,0.045);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.legal-table tr:last-child td {
    border-bottom: 0;
}

.legal-definition-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.legal-definition-grid article {
    min-height: 170px;
    padding: 22px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 18px;
}

.legal-definition-grid strong {
    display: block;
    margin-bottom: 10px;
    color: #fff;
    font-size: 0.92rem;
}

.legal-definition-grid p {
    font-size: 0.84rem;
    line-height: 1.65;
}

/* FOOT NOTE */

.legal-note {
    margin-top: 58px;
    color: rgba(255,255,255,0.36);
    font-size: 0.76rem;
    line-height: 1.65;
}

/* RESPONSIVE */

@media (max-width: 980px) {
    .legal-shell {
        width: min(calc(100% - 48px), 1320px);
    }

    .legal-layout {
        grid-template-columns: 1fr;
        gap: 52px;
    }

    .legal-sidebar {
        position: static;
    }

    .legal-toc {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-left: 1px solid rgba(255,255,255,0.10);
    }

    .legal-toc a {
        padding: 14px 16px;
        border-right: 1px solid rgba(255,255,255,0.10);
    }
}

@media (max-width: 720px) {
    .legal-shell {
        width: min(calc(100% - 36px), 1320px);
    }

    .legal-hero {
        padding: 124px 0 58px;
    }

    .legal-hero h1 {
        font-size: clamp(2.75rem, 13vw, 4.4rem);
        line-height: 0.95;
    }

    .legal-content {
        padding: 70px 0 104px;
    }

    .legal-toc {
        grid-template-columns: 1fr;
    }

    .legal-definition-grid {
        grid-template-columns: 1fr;
    }

    .legal-section {
        padding-bottom: 44px;
        margin-bottom: 44px;
    }

    .legal-section h2 {
        font-size: clamp(1.8rem, 9vw, 2.7rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .legal-toc a {
        transition: none;
    }
}
