/* Shared legal pages and essential-cookie notice. */

.form-privacy a,
.legal-article a,
.legal-summary a {
    color: var(--mint-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

.form-privacy a {
    color: #91ead5;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.footer-links a,
.footer-links button {
    padding: 0;
    color: rgba(255, 255, 255, 0.58);
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-links button:hover,
.footer-links button:focus-visible {
    color: white;
}

.cookie-notice[hidden] {
    display: none;
}

.cookie-notice {
    position: fixed;
    z-index: 1800;
    right: 1.5rem;
    bottom: 1.5rem;
    display: grid;
    width: min(calc(100% - 3rem), 720px);
    padding: 1.35rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.1rem;
    align-items: center;
    color: #f8f1e7;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: rgba(16, 47, 49, 0.97);
    box-shadow: 0 24px 70px rgba(16, 47, 49, 0.3);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.cookie-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cookie-notice__mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #70dfc3;
    border: 1px solid rgba(112, 223, 195, 0.42);
    border-radius: 50%;
    font-size: 1.4rem;
}

.cookie-notice__eyebrow {
    margin: 0 0 0.25rem;
    color: #70dfc3;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.cookie-notice h2 {
    margin: 0;
    color: #fffdf8;
    font-family: var(--font-heading);
    font-size: 1.28rem;
    font-weight: 400;
}

.cookie-notice__copy > p:not(.cookie-notice__eyebrow) {
    max-width: 470px;
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.76rem;
    line-height: 1.55;
}

.cookie-notice__status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    margin-top: 0.65rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.68rem;
}

.cookie-notice__status i,
.cookie-policy-status i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: #70dfc3;
    box-shadow: 0 0 0 4px rgba(112, 223, 195, 0.12);
}

.cookie-notice__actions {
    display: grid;
    min-width: 180px;
    gap: 0.55rem;
    justify-items: center;
}

.cookie-notice__button,
.legal-settings-button {
    min-height: 44px;
    padding: 0.65rem 1rem;
    color: #102f31;
    border: 0;
    border-radius: 999px;
    background: #70dfc3;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.cookie-notice__button:hover,
.cookie-notice__button:focus-visible {
    background: #98ead6;
}

.cookie-notice__actions a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.68rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.cookie-notice :focus-visible,
.footer-links :focus-visible {
    outline: 2px solid #70dfc3;
    outline-offset: 4px;
}

.legal-page {
    background: #fffdf8;
}

.legal-nav {
    position: relative;
    z-index: 20;
    padding: 1.15rem 0;
    background: rgba(251, 245, 235, 0.94);
    border-bottom: 1px solid rgba(59, 43, 36, 0.08);
}

.legal-nav__inner {
    display: flex;
    width: min(100% - 4rem, var(--container-wide));
    margin-inline: auto;
    align-items: center;
    justify-content: space-between;
}

.legal-nav__back {
    color: var(--espresso-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.legal-nav__back span {
    display: inline-block;
    margin-left: 0.4rem;
    transition: transform 0.2s ease;
}

.legal-nav__back:hover span {
    transform: translateX(4px);
}

.legal-main {
    min-height: 70vh;
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(5rem, 10vw, 8rem) 0 clamp(4rem, 7vw, 6rem);
    background:
        radial-gradient(circle at 15% 12%, rgba(89, 203, 185, 0.18), transparent 30%),
        radial-gradient(circle at 88% 80%, rgba(242, 138, 109, 0.14), transparent 30%),
        var(--cream);
}

.legal-hero__inner {
    position: relative;
    z-index: 2;
}

.legal-hero h1 {
    max-width: 880px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 6.2rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.legal-hero__inner > p:not(.section-kicker):not(.legal-updated) {
    max-width: 720px;
    margin: 1.6rem 0 0;
    color: var(--espresso-soft);
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    line-height: 1.8;
}

.legal-updated {
    margin-top: 1.8rem;
    color: rgba(59, 43, 36, 0.48);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

.legal-orbit {
    position: absolute;
    border: 1px solid rgba(79, 116, 123, 0.14);
    border-radius: 50%;
}

.legal-orbit--one {
    top: -180px;
    right: -80px;
    width: 480px;
    height: 480px;
}

.legal-orbit--two {
    right: 110px;
    bottom: -260px;
    width: 540px;
    height: 540px;
}

.legal-layout {
    display: grid;
    padding-top: clamp(4rem, 8vw, 7rem);
    padding-bottom: clamp(5rem, 9vw, 8rem);
    grid-template-columns: minmax(220px, 300px) minmax(0, 760px);
    gap: clamp(3rem, 8vw, 7rem);
    align-items: start;
}

.legal-summary {
    position: sticky;
    top: 2rem;
    padding: 1.8rem;
    border: 1px solid rgba(59, 43, 36, 0.08);
    border-radius: 24px;
    background: #fbf5eb;
    box-shadow: 0 18px 50px rgba(59, 43, 36, 0.07);
}

.legal-summary__eyebrow {
    margin: 0 0 0.7rem;
    color: var(--mint-dark);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.legal-summary h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.1;
}

.legal-summary ul {
    display: grid;
    gap: 0.7rem;
    margin: 1.3rem 0;
    padding: 0;
    list-style: none;
}

.legal-summary li {
    position: relative;
    padding-left: 1.2rem;
    color: var(--espresso-soft);
    font-size: 0.8rem;
}

.legal-summary li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--mint);
    font-size: 1.3rem;
    line-height: 1;
}

.legal-summary > p:not(.legal-summary__eyebrow) {
    margin-top: 1rem;
    color: var(--espresso-soft);
    font-size: 0.82rem;
}

.cookie-policy-status {
    margin-top: 1.2rem;
    color: var(--mint-dark);
    font-size: 0.75rem;
    font-weight: 700;
}

.legal-settings-button {
    width: 100%;
    margin-top: 1.3rem;
    color: white;
    background: var(--mint-dark);
}

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

.legal-article section + section {
    margin-top: 4.5rem;
    padding-top: 4.5rem;
    border-top: 1px solid var(--border);
}

.legal-section-number {
    margin: 0 0 0.65rem;
    color: var(--mint-dark);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.legal-article h2 {
    margin: 0 0 1.3rem;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.legal-article h3 {
    margin: 0 0 0.45rem;
    color: var(--espresso);
    font-size: 0.9rem;
}

.legal-article p,
.legal-list {
    color: var(--espresso-soft);
    font-size: 0.96rem;
    line-height: 1.85;
}

.legal-article p + p {
    margin-top: 1rem;
}

.legal-cards {
    display: grid;
    margin: 1.5rem 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.legal-cards > div {
    padding: 1.25rem;
    border: 1px solid rgba(59, 43, 36, 0.08);
    border-radius: 18px;
    background: #fbf8f2;
}

.legal-cards p {
    font-size: 0.82rem;
    line-height: 1.65;
}

.legal-cards--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legal-table-wrap {
    margin: 1.5rem 0;
    overflow-x: auto;
    border: 1px solid rgba(59, 43, 36, 0.1);
    border-radius: 18px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    background: #fffdf8;
    font-size: 0.82rem;
}

.legal-table th,
.legal-table td {
    padding: 1rem 1.1rem;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid rgba(59, 43, 36, 0.08);
}

.legal-table th {
    color: var(--espresso);
    background: #f8f1e7;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legal-table td {
    color: var(--espresso-soft);
    line-height: 1.6;
}

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

.legal-table code {
    color: var(--mint-dark);
    font-size: 0.78rem;
}

.cookie-table {
    min-width: 680px;
}

.legal-list {
    display: grid;
    gap: 0.85rem;
    padding-left: 1.2rem;
}

.legal-footer .footer-inner {
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-summary {
        position: static;
    }

    .cookie-notice {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .cookie-notice__actions {
        grid-column: 2;
        justify-items: start;
    }

    .footer-note {
        display: none;
    }
}

@media (max-width: 640px) {
    .legal-nav__inner {
        width: min(100% - 2rem, var(--container-wide));
    }

    .legal-nav .nav-logo-img {
        width: 36px;
        height: 36px;
    }

    .legal-nav__back {
        font-size: 0;
    }

    .legal-nav__back span {
        margin: 0;
        font-size: 1.35rem;
    }

    .legal-hero {
        padding-top: 4rem;
    }

    .legal-layout {
        width: min(100% - 2rem, var(--container));
    }

    .legal-cards,
    .legal-cards--compact {
        grid-template-columns: 1fr;
    }

    .cookie-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .cookie-table {
        min-width: 0;
        border-collapse: separate;
        background: transparent;
    }

    .cookie-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .cookie-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .cookie-table tr {
        display: block;
        padding: 0.3rem 1rem;
        border: 1px solid rgba(59, 43, 36, 0.1);
        border-radius: 18px;
        background: #fffdf8;
    }

    .cookie-table td,
    .cookie-table tr:last-child td {
        display: grid;
        grid-template-columns: minmax(5.75rem, 0.38fr) minmax(0, 1fr);
        gap: 0.8rem;
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(59, 43, 36, 0.08);
        overflow-wrap: anywhere;
    }

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

    .cookie-table td::before {
        content: attr(data-label);
        color: var(--espresso);
        font-size: 0.62rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        line-height: 1.6;
        text-transform: uppercase;
    }

    .cookie-notice {
        right: 0.75rem;
        bottom: 0.75rem;
        width: calc(100% - 1.5rem);
        max-height: calc(100svh - 1.5rem);
        padding: 1rem;
        grid-template-columns: 1fr;
        overflow-y: auto;
        border-radius: 20px;
    }

    .cookie-notice__mark {
        display: none;
    }

    .cookie-notice__actions {
        grid-column: 1;
    }

    .cookie-notice__button {
        width: 100%;
    }

    .footer-inner,
    .footer-links {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-notice,
    .legal-nav__back span {
        transition: none;
    }
}
