/* ============ LEGAL PAGES STYLES ============ */

/* Canvas */
#space-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Page Layout */
.legal-page {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 120px 20px 60px;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
.legal-header {
    text-align: center;
    margin-bottom: 50px;
}

.legal-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--soft-purple);
    margin-bottom: 20px;
}

.legal-title {
    font-family: var(--font-main);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: var(--ghost-white);
    margin-bottom: 15px;
}

.legal-updated {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Content Card */
.legal-content {
    background: var(--soft-linen);
    border: 3px solid var(--carbon-black);
    padding: 40px;
    box-shadow: 6px 6px 0 var(--carbon-black);
}

.legal-content h2 {
    font-family: var(--font-main);
    font-size: 20px;
    font-weight: 700;
    color: var(--carbon-black);
    margin: 35px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--soft-purple);
}

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

.legal-content h3 {
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 700;
    color: var(--carbon-black);
    margin: 25px 0 10px 0;
}

.legal-content p {
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.legal-content ul, .legal-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.legal-content li {
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
}

.legal-content a {
    color: var(--soft-purple);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-content strong {
    color: var(--carbon-black);
    font-weight: 600;
}

/* Contact Box */
.legal-contact {
    background: rgba(144, 122, 214, 0.1);
    border: 2px solid var(--soft-purple);
    padding: 20px;
    margin-top: 30px;
}

.legal-contact p {
    margin: 0;
    color: var(--carbon-black);
}

/* Navigation */
.legal-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.legal-nav.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.legal-logo img {
    height: 40px;
    width: auto;
}

.legal-back {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ghost-white);
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.legal-back:hover {
    border-color: var(--soft-purple);
    color: var(--soft-purple);
}

/* Progress Bar (Desktop) - Same as main page */
.progress-container {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    height: 200px;
    width: 40px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-track {
    position: absolute;
    width: 3px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.progress-bar {
    position: absolute;
    bottom: 0;
    width: 3px;
    height: 0%;
    background: var(--soft-purple);
    transition: height 0.1s ease-out;
}

.progress-dot {
    position: absolute;
    bottom: 0;
    width: 10px;
    height: 10px;
    background: var(--soft-purple);
    transform: translateY(50%);
    transition: bottom 0.1s ease-out;
    box-shadow: 0 0 12px var(--soft-purple);
}

.progress-label {
    position: absolute;
    right: 30px;
    bottom: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--soft-purple);
    transform: translateY(50%);
    transition: bottom 0.1s ease-out;
}

/* Hide progress bar under 1145px to avoid overlapping content */
@media (max-width: 1145px) {
    .progress-container {
        display: none;
    }
}

/* Footer */
.legal-footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-footer p {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.legal-footer a {
    color: var(--soft-purple);
    text-decoration: none;
}

.legal-footer a:hover {
    text-decoration: underline;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legal-links a {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-links a:hover {
    color: var(--soft-purple);
}

.legal-links a.active {
    color: var(--soft-purple);
}

/* ============ LEGAL INDEX PAGE ============ */

.legal-subtitle {
    font-family: var(--font-main);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 10px;
}

/* Legal Cards Grid */
.legal-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.legal-card {
    background: var(--soft-linen);
    border: 3px solid var(--carbon-black);
    padding: 30px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
}

.legal-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 4px 4px 0 var(--carbon-black);
}

.legal-card-icon {
    width: 48px;
    height: 48px;
    background: var(--soft-purple);
    border: 2px solid var(--carbon-black);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.legal-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--carbon-black);
}

.legal-card-title {
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: 700;
    color: var(--carbon-black);
    margin-bottom: 10px;
}

.legal-card-desc {
    font-family: var(--font-main);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
}

.legal-card-link {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--soft-purple);
}

/* Contact Section on Index */
.legal-contact-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.legal-contact-section h3 {
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: 700;
    color: var(--ghost-white);
    margin-bottom: 10px;
}

.legal-contact-section > p {
    font-family: var(--font-main);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.legal-contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item:hover {
    color: var(--soft-purple);
}

.contact-item svg {
    width: 18px;
    height: 18px;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 991px) {
    .legal-page {
        padding: 100px 20px 50px;
    }
    .legal-nav {
        padding: 15px 20px;
    }
    .legal-logo img {
        height: 35px;
    }
    .legal-content {
        padding: 30px;
        box-shadow: 5px 5px 0 var(--carbon-black);
    }
    .legal-content h2 {
        font-size: 18px;
    }
    .legal-cards {
        gap: 15px;
    }
    .legal-card {
        padding: 25px;
    }
}

@media (max-width: 767px) {
    .legal-page {
        padding: 90px 15px 40px;
    }
    .legal-nav {
        padding: 15px;
    }
    .legal-logo img {
        height: 30px;
    }
    .legal-back {
        font-size: 10px;
        padding: 8px 14px;
    }
    .legal-title {
        font-size: clamp(26px, 5vw, 36px);
    }
    .legal-content {
        padding: 25px 20px;
        box-shadow: 4px 4px 0 var(--carbon-black);
    }
    .legal-content h2 {
        font-size: 16px;
        margin: 30px 0 12px 0;
    }
    .legal-content h3 {
        font-size: 14px;
    }
    .legal-content p, .legal-content li {
        font-size: 13px;
    }
    .legal-links {
        gap: 15px;
    }
    .legal-links a {
        font-size: 10px;
    }
    /* Cards stack on mobile */
    .legal-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .legal-card {
        padding: 20px;
    }
    .legal-card-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 15px;
    }
    .legal-card-icon svg {
        width: 20px;
        height: 20px;
    }
    .legal-card-title {
        font-size: 16px;
    }
    .legal-card-desc {
        font-size: 12px;
    }
    .legal-contact-section {
        padding: 25px 20px;
    }
    .legal-contact-links {
        gap: 20px;
    }
    .contact-item {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .legal-page {
        padding: 80px 12px 30px;
    }
    .legal-logo img {
        height: 26px;
    }
    .legal-back {
        font-size: 9px;
        padding: 6px 10px;
    }
    .legal-title {
        font-size: 24px;
    }
    .legal-content {
        padding: 20px 15px;
    }
    .legal-content h2 {
        font-size: 15px;
    }
    .legal-content p, .legal-content li {
        font-size: 12px;
        line-height: 1.7;
    }
    .legal-contact {
        padding: 15px;
    }
    .legal-card {
        padding: 18px;
    }
    .legal-card-title {
        font-size: 15px;
    }
    .legal-contact-section h3 {
        font-size: 16px;
    }
    .legal-contact-links {
        flex-direction: column;
        gap: 15px;
    }
}
