/* /assets/css/legal.css */

/* Your landing page forces full-screen + overflow hidden.
   Override ONLY when html/body has .legal-page */
html.legal-page,
body.legal-page {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* If your landing has a canvas container, hide it on legal pages */
body.legal-page #canvas-container {
    display: none !important;
}

.legal-wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 140px 20px 80px; /* Increased top padding to account for fixed header */
}

.legal-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    
    display: flex;
    align-items: center;
    gap: 16px;
    
    /* Match landing page spacing exactly (30px margin) */
    padding: 30px; 
    
    /* Glassmorphism */
    background: var(--legal-header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--legal-border);
}

.legal-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.legal-home:hover {
    opacity: 1;
}

.legal-home:focus-visible,
.legal-brand:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 8px;
}

.legal-brand {
    font-family: monospace;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    text-decoration: none !important; /* Remove underline for the Home text */
}

.legal-brand:hover {
    color: var(--text-color);
}

.legal-logo {
    height: 60px; /* Exact match to landing page */
    width: auto;
    transition: opacity 0.2s ease; /* Ensure smooth transition for JS update */
}

.legal-title {
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 200;
    letter-spacing: 0.25rem;
    margin-bottom: 10px;

    /* Reuse your landing vibe */
    background: linear-gradient(to right, var(--gradient-text-start), var(--gradient-text-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-updated {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 22px;
}
   
.legal-card {
    margin: 14px 0 18px;
    padding: 16px 18px;
    border: 1px solid var(--legal-border);
    border-radius: 16px;
    background: var(--legal-card-bg);
    backdrop-filter: blur(6px);
}

.legal-principle-card {
    margin-top: 28px;
    padding: clamp(1.2rem, 3vw, 1.6rem);
    border-color: rgba(59, 130, 246, 0.28);
    background: var(--glass-surface);
    box-shadow: var(--glass-shadow);
}

body.legal-page .legal-principle-title {
    margin-top: 0;
    margin-bottom: 0.65rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.legal-principle-card p {
    color: var(--text-secondary);
}

/* spacing between paragraphs inside cards */
.legal-card p + p {
    margin-top: 13px;
}

/* spacing between list items inside cards */
.legal-card li + li {
    margin-top: 3px;
}

/* spacing between list items and paragraphs inside cards */    
.legal-card ul + p {
    margin-top: 8px;
}

/* spacing between paragraphs and list items inside cards */
.legal-card p + ul {
    margin-top: 8px;
}

body.legal-page h2 {
    margin-top: 24px;
    margin-bottom: 10px;
    font-weight: 400;
    letter-spacing: 0.06em;
}

body.legal-page p,
body.legal-page li {
    line-height: 1.65;
    font-weight: 300;
}

body.legal-page ul {
    padding-left: 18px;
}

body.legal-page a {
    color: var(--link-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-muted {
    opacity: 0.85;
    color: var(--text-secondary);
}

body.legal-page .site-footer {
    animation: none;
    padding-top: clamp(2.5rem, 6vw, 4rem);
}

body.legal-page .site-footer a {
    text-decoration: none;
}

body.legal-page .site-footer .footer-brand-link {
    color: var(--text-color);
}

body.legal-page .site-footer .footer-brand-link:hover,
body.legal-page .site-footer .footer-link:hover {
    color: var(--accent-color);
}

body.legal-page .site-footer .footer-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.4;
}

body.legal-page .site-footer .footer-link[aria-current="page"] {
    color: var(--text-secondary);
}

body.legal-page .site-footer .footer-column-title {
    margin-top: 0;
    margin-bottom: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.legal-page .site-footer .footer-link-list {
    display: grid;
    gap: 0.55rem;
    padding-left: 0;
    list-style: none;
}

body.legal-page .site-footer .footer-link-list li {
    margin-top: 0;
    font-weight: 400;
    line-height: 1.4;
}

body.legal-page .site-footer .footer-brand-line {
    line-height: 1.45;
    font-weight: 400;
}

body.legal-page .site-footer .footer-supporting-line,
body.legal-page .site-footer .footer-policy-note {
    line-height: 1.6;
    font-weight: 300;
}

.footer-policy-note {
    max-width: 720px;
    margin-bottom: 0.85rem;
    color: var(--text-secondary);
}

/* media queries */
/* for legal page */
@media (max-width: 900px){
    .legal-logo{ height: 40px; }
    .legal-top { padding: 20px; }
}
