/* ========================================
   INFRIST — Legal Pages Styles
   Premium Dark SaaS Aesthetic
   ======================================== */

/* ---------- Legal Page Layout ---------- */
.legal-page {
    padding: 160px clamp(24px, 5vw, 80px) 80px;
}

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

/* ---------- Legal Header ---------- */
.legal-header {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.legal-header .pill {
    margin-bottom: 1.5rem;
}

.legal-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 30%, var(--purple-light) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-effective {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    letter-spacing: -0.01em;
}

.legal-effective strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ---------- Legal Sections ---------- */
.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-number {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--purple-light);
    background: rgba(124, 92, 255, 0.08);
    border: 1px solid rgba(124, 92, 255, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.legal-section h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    color: var(--text);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.legal-section p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

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

.legal-section a {
    color: var(--purple-light);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(155, 127, 255, 0.3);
    transition: color 0.2s, text-decoration-color 0.2s;
}

.legal-section a:hover {
    color: var(--blue-light);
    text-decoration-color: rgba(125, 222, 255, 0.5);
}

/* ---------- Lists ---------- */
.legal-section ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 1.25rem;
}

.legal-section ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    box-shadow: 0 0 8px rgba(124, 92, 255, 0.3);
}

.legal-section ul li strong {
    color: var(--text);
    font-weight: 600;
}

/* ---------- Contact Card ---------- */
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
}

.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.contact-row+.contact-row {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.contact-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.01em;
}

.contact-value {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.contact-value a {
    color: var(--purple-light);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-value a:hover {
    color: var(--blue-light);
}

/* ---------- Cookie Table ---------- */
.cookie-table {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cookie-category {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color 0.3s;
}

.cookie-category:hover {
    border-color: var(--border-hover);
}

.cookie-cat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cookie-cat-icon {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.cookie-cat-icon.essential {
    background: rgba(52, 211, 153, 0.08);
}

.cookie-cat-icon.analytics {
    background: rgba(79, 209, 255, 0.08);
}

.cookie-cat-icon.functional {
    background: rgba(124, 92, 255, 0.08);
}

.cookie-cat-icon.marketing {
    background: rgba(255, 165, 0, 0.08);
}

.cookie-cat-header h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    margin: 0;
    color: var(--text);
}

.cookie-cat-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 5px;
    margin-top: 4px;
}

.cookie-cat-badge.essential {
    color: var(--green);
    background: rgba(52, 211, 153, 0.1);
}

.cookie-cat-badge.analytics {
    color: var(--blue);
    background: rgba(79, 209, 255, 0.1);
}

.cookie-cat-badge.functional {
    color: var(--purple-light);
    background: rgba(124, 92, 255, 0.1);
}

.cookie-cat-badge.marketing {
    color: #FFA500;
    background: rgba(255, 165, 0, 0.1);
}

.cookie-category>p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.cookie-details {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cookie-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    font-size: 0.82rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    align-items: center;
}

.cookie-name {
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    color: var(--text);
    font-size: 0.8rem;
}

.cookie-purpose {
    color: var(--text-secondary);
}

.cookie-duration {
    color: var(--text-tertiary);
    text-align: center;
}

.cookie-type {
    color: var(--text-tertiary);
    text-align: right;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: clamp(3rem, 6vw, 5rem) clamp(24px, 5vw, 80px) 2rem;
    background: rgba(6, 8, 13, 0.9);
    backdrop-filter: blur(20px);
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
}

.footer-brand {
    margin-bottom: 2rem;
}

.footer-logo-wrapper {
    height: 48px;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.footer-logo-wrapper img {
    margin: -25px;
}

.footer-logo {
    height: 176px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    font-weight: 400;
    margin-top: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.footer-col a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--purple-light);
}

.footer-bottom {
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ---------- Cookie Consent Banner ---------- */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1.25rem clamp(24px, 5vw, 80px);
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    padding-left: max(clamp(24px, 5vw, 80px), env(safe-area-inset-left));
    padding-right: max(clamp(24px, 5vw, 80px), env(safe-area-inset-right));
    background: rgba(12, 15, 24, 0.95);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-top: 1px solid var(--border);
    transform: translateY(100%);
    transition: transform 0.5s var(--ease-out);
}

.cookie-consent.visible {
    transform: translateY(0);
}

.cookie-consent-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.cookie-consent-text a {
    color: var(--purple-light);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(155, 127, 255, 0.3);
    transition: color 0.2s;
}

.cookie-consent-text a:hover {
    color: var(--blue-light);
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    font-family: var(--font-body);
    font-size: 0.825rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s, background 0.2s;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--purple), #5A3EDB);
    color: white;
}

.cookie-btn-accept:hover {
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.3);
}

.cookie-btn-decline {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.cookie-btn-decline:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--border-hover);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .legal-page {
        padding: 120px 20px 60px;
    }

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

    .legal-section h2 {
        font-size: 1.25rem;
        flex-wrap: wrap;
    }

    .cookie-item {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .cookie-consent-inner {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .contact-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .cookie-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .cookie-duration,
    .cookie-type {
        text-align: left;
    }
}