/* LikeFlow Legal & Policy Pages Stylesheet (Terms of Service, Privacy Policy)
   Crafted for clean, highly legible, and scientific legal documentation.
   Strictly utilizes design tokens from tokens.css and site-canvas.css. */

.legal-page .site-feature-canvas {
    background-color: var(--canvas);
}

/* --- Hero Section & Breadcrumb --- */
.legal-hero {
    position: relative;
    max-width: var(--lf-content-max);
    margin: 0 auto;
    padding: calc(var(--space-26) + var(--space-26)) var(--lf-page-gutter) var(--space-10);
    text-align: center;
}

@media (min-width: 768px) {
    .legal-hero {
        padding: calc(var(--space-26) + var(--space-26) + var(--space-6)) var(--lf-page-gutter-wide) var(--space-14);
    }
}

.legal-hero__breadcrumb {
    display: flex;
    width: max-content;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin: 0 auto var(--space-5);
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
    background: rgb(var(--ch-white) / var(--a-04));
    border: 1px solid rgb(var(--ch-white) / var(--a-08));
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.legal-hero__breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--dur-base) ease;
}

.legal-hero__breadcrumb a:hover {
    color: var(--text-primary);
}

.legal-hero__breadcrumb .material-symbols-outlined {
    font-size: 16px;
    opacity: 0.6;
}

.legal-hero__eyebrow {
    display: block;
    width: 100%;
    text-align: center;
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--brand-blue-tint);
    margin: 0 auto var(--space-3);
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.legal-hero h1 {
    font-family: 'Inter', sans-serif;
    font-size: var(--text-4xl);
    font-weight: var(--weight-black);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    max-width: 1040px;
    margin: 0 auto var(--space-5);
    text-wrap: balance;
}

.legal-hero__lead {
    font-size: clamp(var(--text-base), 2vw, var(--text-xl));
    line-height: var(--lf-leading-body);
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto var(--space-6);
    text-wrap: balance;
}

.legal-hero__meta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
    background: rgba(var(--brand-blue-rgb), var(--a-10));
    border: 1px solid rgba(var(--brand-blue-rgb), var(--a-24));
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--brand-blue-tint);
}

.legal-hero__meta time {
    font-family: 'Inter', monospace;
}

/* --- Main Legal Container --- */
.legal-container {
    max-width: var(--lf-content-max);
    margin: 0 auto;
    padding: var(--space-12) var(--lf-page-gutter) var(--space-16);
}

@media (min-width: 768px) {
    .legal-container {
        padding: var(--space-16) var(--lf-page-gutter-wide) var(--space-20);
    }
}

/* --- Legal Section Cards (2 Columns × 6 Rows) --- */
.legal-sections-feed {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .legal-sections-feed {
        grid-template-columns: repeat(2, 1fr);
    }
}

.legal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--space-8);
    border-radius: var(--radius-card);
    background: rgb(var(--ch-surface-low) / var(--a-72));
    border: 1px solid rgb(var(--ch-white) / var(--a-08));
    backdrop-filter: blur(var(--blur-md));
    transition: border-color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}

.legal-card:hover {
    border-color: rgba(var(--brand-blue-rgb), var(--a-30));
    box-shadow: 0 12px 30px rgba(0, 0, 0, var(--a-24));
}

.legal-card h2 {
    font-family: 'Inter', sans-serif;
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4);
}

.legal-card p {
    font-size: var(--text-base);
    line-height: var(--lf-leading-body);
    color: var(--text-secondary);
    margin: 0;
}

/* --- Subprocessors Table Section (Privacy Page) --- */
.legal-subprocessors-section {
    max-width: var(--lf-content-max);
    margin: 0 auto;
    padding: var(--space-12) var(--lf-page-gutter) var(--space-16);
    border-top: 1px solid rgb(var(--ch-white) / var(--a-08));
}

@media (min-width: 768px) {
    .legal-subprocessors-section {
        padding: var(--space-16) var(--lf-page-gutter-wide) var(--space-20);
    }
}

.legal-subprocessors-header {
    margin-bottom: var(--space-8);
}

.legal-subprocessors-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
    font-weight: var(--weight-black);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
    margin: 0 0 var(--space-2);
}

.legal-subprocessors-header p {
    font-size: var(--text-base);
    line-height: var(--lf-leading-body);
    color: var(--text-secondary);
    margin: 0;
}

.legal-table-scroll {
    overflow-x: auto;
    border-radius: var(--radius-card);
    border: 1px solid rgb(var(--ch-white) / var(--a-08));
    background: rgb(var(--ch-surface-low) / var(--a-72));
    backdrop-filter: blur(var(--blur-md));
    margin-bottom: var(--space-6);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.legal-table th,
.legal-table td {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid rgb(var(--ch-white) / var(--a-08));
    font-size: var(--text-sm);
    line-height: var(--lf-leading-copy);
}

.legal-table thead th {
    background: rgb(var(--ch-white) / var(--a-04));
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--brand-blue-tint);
}

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

.legal-table tbody tr:hover {
    background: rgb(var(--ch-white) / var(--a-04));
}

.legal-table tbody th {
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
    white-space: nowrap;
}

.legal-table tbody td {
    color: var(--text-secondary);
}

/* Callout Footnote */
.legal-note-box {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-card);
    background: rgba(var(--brand-blue-rgb), var(--a-08));
    border: 1px solid rgba(var(--brand-blue-rgb), var(--a-18));
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: var(--lf-leading-copy);
}

.legal-note-box .material-symbols-outlined {
    font-size: 20px;
    color: var(--brand-blue-tint);
    flex-shrink: 0;
    line-height: 1.4;
}

.legal-note-box p {
    margin: 0;
}

/* --- Closing CTA Card --- */
.legal-cta-card {
    max-width: 820px;
    margin: var(--space-12) auto var(--space-20);
    padding: var(--space-12) var(--space-8);
    border-radius: var(--radius-panel);
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(var(--brand-blue-rgb), var(--a-14)), transparent 80%),
        rgb(var(--ch-surface-low) / var(--a-85));
    border: 1px solid rgb(var(--ch-white) / var(--a-12));
    text-align: center;
}

.legal-cta-card h2 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
    font-weight: var(--weight-black);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
    margin: 0 0 var(--space-3);
    text-wrap: balance;
}

.legal-cta-card p {
    font-size: var(--text-base);
    line-height: var(--lf-leading-copy);
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto var(--space-7);
    text-wrap: balance;
}

/* Unified CTA Button */
.legal-page .footer-start-free {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--lf-button-foreground) !important;
    background: var(--lf-button-bg) !important;
    border: 1px solid var(--lf-button-border) !important;
    border-radius: var(--radius-full) !important;
    font-size: var(--text-base) !important;
    font-weight: var(--weight-bold) !important;
    padding: var(--space-4) var(--space-8) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, var(--a-24)) !important;
    text-decoration: none;
    transition: transform var(--dur-base) ease, box-shadow var(--dur-base) ease !important;
}

.legal-page .footer-start-free:hover {
    color: var(--lf-button-foreground) !important;
    background: var(--lf-button-bg) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, var(--a-24)), 0 0 16px rgba(var(--brand-blue-rgb), var(--a-14)) !important;
}
