/* DDactic Legal Documents Stylesheet */
/* Follows the same design system as the main website */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    font-size: 1rem; /* 16px - research-backed minimum */
    padding: 0;
    margin: 0;
}

.legal-document {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: var(--white);
}

/* Header */
.legal-header {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 2rem;
    margin-bottom: 3rem;
}

/* Brand Header with Logo */
.brand-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.brand-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.legal-header h1 {
    font-size: 2.5rem; /* 40px - Section Titles */
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.legal-header .overview {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Sections */
.legal-section {
    margin-bottom: 3rem;
}

.legal-section h2 {
    font-size: 1.75rem; /* 28px - Subsection Titles */
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: -0.02em;
}

.legal-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Paragraphs */
.legal-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    max-width: 65ch; /* Optimal line length - research-backed */
}

/* Lists */
.legal-section ul,
.legal-section ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.legal-section li {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.legal-section ul li {
    list-style-type: disc;
}

.legal-section ol li {
    list-style-type: decimal;
}

/* Strong emphasis */
.legal-section strong {
    font-weight: 600;
    color: var(--text-dark);
}

/* Tables */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    border-radius: 0.5rem;
    overflow: hidden;
}

.legal-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.legal-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legal-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.legal-table tbody tr:hover {
    background-color: var(--bg-light);
}

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

/* Highlighted boxes */
.legal-highlight {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
}

.legal-highlight p {
    margin-bottom: 0.5rem;
}

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

/* Signature section */
.legal-signatures {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.signature-block {
    display: inline-block;
    width: 48%;
    vertical-align: top;
    margin-bottom: 2rem;
}

.signature-block h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.signature-line {
    border-bottom: 2px solid var(--text-dark);
    margin: 3rem 0 0.5rem 0;
    min-height: 50px;
}

.signature-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Footer */
.legal-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
}

.legal-footer p {
    margin-bottom: 0.5rem;
}

.legal-footer strong {
    color: var(--text-dark);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-complete {
    background-color: #c6f6d5;
    color: #22543d;
}

.status-pending {
    background-color: #feebc8;
    color: #7c2d12;
}

.status-template {
    background-color: #bee3f8;
    color: #2c5282;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-document {
        padding: 2rem 1rem;
    }

    .legal-header h1 {
        font-size: 2rem;
    }

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

    .signature-block {
        width: 100%;
        display: block;
    }
}

/* Print styles */
@media print {
    .legal-document {
        max-width: 100%;
        padding: 1rem;
    }

    .legal-header {
        page-break-after: avoid;
    }

    .legal-section {
        page-break-inside: avoid;
    }

    .legal-signatures {
        page-break-inside: avoid;
    }
}


