/* =========================================================
   Acuaria — Legal pages styles
   ========================================================= */

.legal-body {
    background: var(--color-cream);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Header ---------- */
.legal-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border-light);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    box-shadow: 0 1px 0 rgba(13, 27, 42, 0.04);
}

.legal-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.legal-header__brand img {
    height: 54px;
    width: auto;
    display: block;
}

.legal-header__back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-teal);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    transition: all var(--transition-base);
}

.legal-header__back:hover {
    background: rgba(27, 184, 160, 0.1);
    transform: translateX(-2px);
}

/* ---------- Main ---------- */
.legal-main {
    flex: 1;
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.legal-page__header {
    margin-bottom: var(--space-12);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border-light);
}

.legal-page__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--font-weight-black);
    color: var(--color-navy-deep);
    margin-bottom: var(--space-3);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.legal-page__updated {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
}

/* ---------- Content ---------- */
.legal-content {
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: clamp(2rem, 4vw, 3.5rem);
    box-shadow: var(--shadow-sm);
    color: var(--color-navy-deep);
    line-height: 1.75;
    font-size: var(--font-size-body);
}

.legal-content h2 {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-extrabold);
    color: var(--color-navy-deep);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: var(--font-size-h4);
    font-weight: var(--font-weight-bold);
    color: var(--color-navy-deep);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.legal-content p {
    margin-bottom: var(--space-4);
    color: var(--color-navy-deep);
}

.legal-content ul,
.legal-content ol {
    margin: var(--space-4) 0;
    padding-left: var(--space-6);
    color: var(--color-navy-deep);
}

.legal-content ul li,
.legal-content ol li {
    margin-bottom: var(--space-2);
    line-height: 1.7;
}

.legal-content ul {
    list-style: disc;
}

.legal-content ol {
    list-style: decimal;
}

.legal-content a {
    color: var(--color-teal);
    font-weight: var(--font-weight-semibold);
    text-decoration: underline;
    text-decoration-color: rgba(27, 184, 160, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--transition-fast);
}

.legal-content a:hover {
    text-decoration-color: var(--color-teal);
}

.legal-content strong {
    font-weight: var(--font-weight-bold);
    color: var(--color-navy-deep);
}

.legal-content code {
    background: var(--color-cream);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.legal-content blockquote {
    margin: var(--space-6) 0;
    padding: var(--space-5) var(--space-6);
    background: rgba(27, 184, 160, 0.05);
    border-left: 4px solid var(--color-teal);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-dark);
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-6) 0;
    font-size: var(--font-size-sm);
}

.legal-content th,
.legal-content td {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
}

.legal-content th {
    background: var(--color-cream);
    font-weight: var(--font-weight-bold);
    color: var(--color-navy-deep);
}

.legal-content hr {
    border: none;
    border-top: 1px solid var(--color-border-light);
    margin: var(--space-10) 0;
}

/* ---------- Footer note ---------- */
.legal-footer-note {
    margin-top: var(--space-10);
    padding: var(--space-6);
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.legal-footer-note p {
    margin: 0;
    color: var(--color-text-muted);
}

.legal-footer-note a {
    color: var(--color-teal);
    font-weight: var(--font-weight-semibold);
}

/* ---------- Bottom bar ---------- */
.legal-bottom {
    background: var(--color-navy-dark);
    color: rgba(242, 237, 228, 0.65);
    padding: var(--space-8) 0;
    margin-top: var(--space-16);
}

.legal-bottom__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
}

.legal-bottom__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
}

.legal-bottom__links a {
    font-size: var(--font-size-sm);
    color: rgba(242, 237, 228, 0.75);
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
}

.legal-bottom__links a:hover {
    color: var(--color-teal-light);
}

.legal-bottom__copy {
    margin: 0;
    font-size: var(--font-size-xs);
}

/* ---------- TOC (table of contents) ---------- */
.legal-toc {
    background: var(--color-cream);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-8);
}

.legal-toc__title {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-teal);
    margin-bottom: var(--space-3);
}

.legal-toc ol {
    padding-left: var(--space-5);
    margin: 0;
}

.legal-toc li {
    margin-bottom: var(--space-1);
    font-size: var(--font-size-sm);
}

.legal-toc a {
    color: var(--color-navy-deep);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
}

.legal-toc a:hover {
    color: var(--color-teal);
}
