/**
 * Legal Pages Styles for caspile.com
 * Professional, readable legal document styling
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent-primary: #6366f1;
    --accent-hover: #4f46e5;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Legal Document Header */
.legal-header {
    background: var(--bg-secondary);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.legal-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.last-updated {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Legal Content Card */
.legal-content {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

h1:first-child {
    margin-top: 0;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    line-height: 1.8;
}

ul, ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.8;
}

ul ul, ol ol, ul ol, ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Emphasis */
strong {
    font-weight: 600;
    color: var(--text-primary);
}

em {
    font-style: italic;
}

/* Sections */
.section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section:last-child {
    border-bottom: none;
}

/* Highlight Box */
.highlight-box {
    background: #f1f5f9;
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.highlight-box p {
    margin-bottom: 0.5rem;
}

.highlight-box p:last-child {
    margin-bottom: 0;
}

/* Warning Box */
.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.warning-box p {
    margin-bottom: 0.5rem;
}

.warning-box p:last-child {
    margin-bottom: 0;
}

/* Contact Info */
.contact-info {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-links a::after {
    content: "|";
    margin-left: 1.5rem;
    color: var(--border-color);
}

.footer-links a:last-child::after {
    content: "";
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Definitions List */
.definition-list {
    margin: 1.5rem 0;
}

.definition-list dt {
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.definition-list dd {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

/* Table of Contents */
.toc {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.toc h2 {
    font-size: 1.125rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--accent-primary);
    text-decoration: none;
}

.toc a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-content {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .footer-links a::after {
        display: none;
    }
    
    .container {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .legal-header {
        padding: 2rem 0;
    }
    
    .legal-content {
        padding: 1.5rem 1rem;
    }
    
    ul, ol {
        padding-left: 1.5rem;
    }
}
