/* ==========================================================
   AVSTUDIO
   LEGAL PAGES (ÁSZF + IMPRESSZUM)

   The main site supplies shared variables, theme styles,
   the shared header, footer styling, reveal and the
   page-transition animation. This file owns the legal pages.
========================================================== */



/* ==========================================================
   PAGE
========================================================== */

.legal-page {
    background: var(--background);
    color: var(--text);
}

.legal-width {
    width: min(1200px, 88%);

    margin: 0 auto;
}



/* ==========================================================
   PAGE TITLE
========================================================== */

.legal-hero {
    border-bottom: 1px solid var(--border);
}

.legal-hero .legal-width {
    padding: 175px 0 70px;
}

.legal-hero h1 {
    max-width: 920px;

    font-size: clamp(2.6rem, 5.4vw, 5.4rem);
    font-weight: 650;
    line-height: 1.02;
    letter-spacing: -0.05em;
}

/* Gold line that draws itself, like on the services page */

.legal-line {
    width: min(420px, 60%);
    height: 2px;

    margin: 38px 0 24px;

    background: var(--gold);

    transform-origin: left center;

    animation: legalLine 0.9s cubic-bezier(0.76, 0, 0.24, 1) 0.25s both;
}

@keyframes legalLine {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.legal-meta {
    color: var(--gold);

    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.legal-intro {
    max-width: 700px;

    margin-top: 18px;

    color: var(--text-secondary);

    font-size: 1.05rem;
    line-height: 1.8;
}



/* ==========================================================
   CONTENTS + TEXT (ÁSZF)
========================================================== */

.legal-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 80px;
    align-items: start;

    padding: 80px 0 110px;
}


/* TABLE OF CONTENTS — the section you are reading is highlighted */

.legal-toc {
    position: sticky;
    top: 115px;
}

.legal-toc-label {
    display: block;

    margin-bottom: 14px;

    color: var(--gold);

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.legal-toc ol {
    list-style: none;

    border-top: 1px solid var(--border);
}

.legal-toc a {
    position: relative;

    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 6px;

    padding: 10px 0;

    border-bottom: 1px solid var(--border);

    color: var(--text-secondary);

    text-decoration: none;

    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;

    transition:
        color 0.25s ease,
        padding-left 0.25s ease;
}

.legal-toc a::before {
    content: "";

    position: absolute;
    left: 0;
    top: 50%;

    width: 0;
    height: 2px;

    background: var(--gold);

    transition: width 0.25s ease;
}

.legal-toc a span {
    padding-top: 2px;

    color: var(--gold);

    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.legal-toc a em {
    font-style: normal;
}

.legal-toc a:hover,
.legal-toc a.is-active {
    padding-left: 18px;

    color: var(--text);
}

.legal-toc a:hover::before,
.legal-toc a.is-active::before {
    width: 10px;
}


/* SECTIONS */

.legal-section {
    padding-bottom: 46px;
    margin-bottom: 46px;

    border-bottom: 1px solid var(--border);

    scroll-margin-top: 110px;
}

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

.legal-section h2 {
    display: flex;
    align-items: baseline;
    gap: 16px;

    margin-bottom: 22px;

    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.legal-number {
    flex-shrink: 0;

    color: var(--gold);

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.legal-section p {
    max-width: 760px;

    color: var(--text-secondary);

    line-height: 1.8;
}

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

.legal-section a {
    color: var(--gold);
}


/* Sub-headings, e.g. the two people in the privacy policy */

.legal-section h3 {
    margin: 34px 0 14px;

    font-size: 1.2rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.legal-section h2 + h3,
.legal-section p + h3 {
    margin-top: 28px;
}

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


/* One processing activity: who, what, why, on what basis, how long */

.legal-data.legal-activity dd {
    font-weight: 500;

    color: var(--text-secondary);

    line-height: 1.7;
}


/* LISTS: gold dash for bullets, gold numbers for steps */

.legal-list {
    max-width: 760px;

    list-style: none;

    counter-reset: legal-step;
}

.legal-list li {
    position: relative;

    padding: 9px 0 9px 34px;

    color: var(--text-secondary);

    line-height: 1.75;
}

.legal-list li strong {
    color: var(--text);
}

ul.legal-list li::before {
    content: "";

    position: absolute;
    left: 2px;
    top: 1.45em;

    width: 14px;
    height: 2px;

    background: var(--gold);
}

ol.legal-list li {
    counter-increment: legal-step;
}

ol.legal-list li::before {
    content: counter(legal-step, decimal-leading-zero);

    position: absolute;
    left: 0;
    top: 12px;

    color: var(--gold);

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}


/* DATA LIST (label / value rows) */

.legal-data {
    max-width: 760px;

    border-top: 1px solid var(--border);
}

.legal-data > div {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;

    padding: 14px 0;

    border-bottom: 1px solid var(--border);
}

.legal-data dt {
    padding-top: 3px;

    color: var(--gold);

    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.legal-data dd {
    color: var(--text);

    font-weight: 600;

    overflow-wrap: anywhere;
}

.legal-data a {
    color: inherit;

    text-decoration: none;

    border-bottom: 1px solid var(--border);

    transition:
        color 0.25s ease,
        border-color 0.25s ease;
}

.legal-data a:hover {
    color: var(--gold);

    border-color: var(--gold);
}



/* ==========================================================
   IMPRESSZUM
========================================================== */

.imprint-layout {
    padding: 80px 0 110px;
}

.imprint-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.imprint-card {
    position: relative;

    padding: 34px 30px;

    border: 1px solid var(--border);

    background: var(--surface);

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.imprint-card::before {
    content: "";

    position: absolute;
    top: -1px;
    left: -1px;

    width: 0;
    height: 2px;

    background: var(--gold);

    transition: width 0.45s cubic-bezier(0.76, 0, 0.24, 1);
}

.imprint-card:hover {
    transform: translateY(-3px);

    border-color: var(--gold);

    box-shadow: var(--shadow);
}

.imprint-card:hover::before {
    width: calc(100% + 2px);
}

.imprint-card h2 {
    margin: 14px 0 22px;

    font-size: 1.5rem;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.imprint-card .legal-data > div {
    grid-template-columns: 1fr;
    gap: 4px;
}

.imprint-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px;

    margin-top: 70px;
    padding-top: 50px;

    border-top: 1px solid var(--border);
}

.imprint-note h2 {
    margin-bottom: 16px;

    font-size: 1.6rem;
    font-weight: 650;
    letter-spacing: -0.03em;
}

.imprint-note p {
    max-width: 560px;

    color: var(--text-secondary);

    line-height: 1.8;
}

.imprint-note .services-more-link {
    margin-top: 22px;
}



/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 950px) {

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

        padding-top: 60px;
    }

    .legal-toc {
        position: static;
    }

    .legal-toc ol {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
    }

    .imprint-grid {
        grid-template-columns: 1fr;
    }

    .imprint-notes {
        grid-template-columns: 1fr;
        gap: 40px;
    }

}



/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 650px) {

    .legal-width {
        width: 90%;
    }

    .legal-hero .legal-width {
        padding: 130px 0 50px;
    }

    .legal-hero h1 {
        font-size: clamp(2.3rem, 11vw, 3.4rem);
    }

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

    .legal-section h2 {
        font-size: 1.5rem;
    }

    .legal-data > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .imprint-card {
        padding: 28px 22px;
    }

}



/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .legal-line {
        animation: none;
    }

}
