/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: #333;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

/* Homepage specific styles */
.homepage {
    background-color: #000000;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.homepage-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 0;
}

.homepage-content {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.brand-name {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-transform: uppercase;
    line-height: 1.1;
    word-break: break-word;
}

.tagline {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.homepage-footer {
    background-color: transparent;
    padding: 1.5rem 2rem;
    flex-shrink: 0;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.footer-link:hover,
.footer-link:focus {
    opacity: 0.8;
    transform: translateY(-2px);
    outline: none;
}

/* Legal pages styles */
.legal-page {
    background-color: #ffffff;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legal-header {
    background-color: #f8f9fa;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.legal-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.legal-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #000;
    margin-bottom: 0.5rem;
    text-align: center;
}

.legal-subtitle {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    font-weight: 400;
}

.legal-main {
    flex: 1;
    padding: 3rem 0;
}

.legal-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

.table-of-contents {
    position: sticky;
    top: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.toc-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000;
}

.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.toc-link:hover,
.toc-link:focus {
    color: #000;
    text-decoration: underline;
}

.legal-text {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    line-height: 1.7;
}

.legal-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    color: #000;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

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

.legal-text h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: #333;
}

.legal-text p {
    margin-bottom: 1rem;
    color: #555;
}

.legal-text ul {
    margin: 1rem 0 1rem 1.5rem;
    color: #555;
}

.legal-text li {
    margin-bottom: 0.5rem;
}

.legal-text strong {
    color: #000;
    font-weight: 600;
}

.legal-text em {
    font-style: italic;
}

.legal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 2rem 0;
}

.legal-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.legal-footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legal-footer-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.legal-footer-link:hover,
.legal-footer-link:focus {
    color: #000;
    background-color: #e9ecef;
    text-decoration: none;
}

/* 404 page styles */
.error-page {
    background-color: #000000;
    color: #ffffff;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 900;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.error-message {
    font-size: clamp(1.2rem, 4vw, 2rem);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.error-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 1rem 2rem;
    border: 2px solid #ffffff;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.error-link:hover,
.error-link:focus {
    background-color: #ffffff;
    color: #000000;
}

/* Responsive design */
@media (max-width: 768px) {
    .homepage {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .homepage-main {
        padding: 1rem;
        min-height: calc(100vh - 120px);
    }
    
    .homepage-footer {
        padding: 1rem;
    }
    
    .footer-nav {
        gap: 1rem;
    }
    
    .footer-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Legal pages mobile */
    .legal-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .table-of-contents {
        position: static;
        order: 2;
        margin-top: 2rem;
    }
    
    .legal-text {
        padding: 1.5rem;
        order: 1;
    }
    
    .legal-header .container,
    .legal-footer .container {
        padding: 0 1rem;
    }
    
    .legal-main {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .homepage-content {
        padding: 0 1rem;
    }
    
    .brand-name {
        font-size: clamp(2rem, 10vw, 4rem);
        letter-spacing: 0.02em;
    }
    
    .tagline {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }
    
    .footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .legal-text {
        padding: 1rem;
    }
    
    .legal-text h2 {
        font-size: 1.3rem;
    }
    
    .legal-text h3 {
        font-size: 1.1rem;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

.homepage *:focus {
    outline-color: #ffffff;
}

/* Print styles */
@media print {
    .homepage-footer,
    .legal-footer,
    .table-of-contents {
        display: none;
    }
    
    .legal-content {
        grid-template-columns: 1fr;
    }
    
    .legal-text {
        border: none;
        box-shadow: none;
    }
}

