/* ============================================
   QuickMem Legal Pages — Premium Stylesheet
   Shared by policy.html and services.html
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --primary: #0097A7;
    --primary-light: #B2EBF2;
    --primary-lighter: #E0F7FA;
    --primary-dark: #00796B;
    --accent: #FF6D4A;

    /* Neutral Colors */
    --bg: #F5F9FA;
    --card-bg: #FFFFFF;
    --text: #1A2B3C;
    --text-muted: #5A6B7C;
    --text-light: #8A9BAC;
    --border: #E0ECF0;

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 151, 167, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 151, 167, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 151, 167, 0.12);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Sticky Header
   ============================================ */
.legal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.legal-header-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.legal-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    transition: opacity 0.2s ease;
}

.legal-header-brand:hover {
    opacity: 0.8;
    text-decoration: none;
}

.legal-header-brand img {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
}

.legal-header-brand span {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.legal-header-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px 16px;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.legal-header-back:hover {
    color: var(--primary);
    background-color: var(--primary-lighter);
    text-decoration: none;
}

.legal-header-back svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   Hero Banner
   ============================================ */
.legal-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 56px 24px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.legal-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.legal-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 8px;
    letter-spacing: -0.03em;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.legal-hero .updated-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ============================================
   Main Container
   ============================================ */
.legal-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px 60px;
    flex: 1;
}

/* ============================================
   Content Card
   ============================================ */
.content-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    position: relative;
}

/* ============================================
   Typography
   ============================================ */
.content-card h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    margin: 40px 0 14px;
    padding-left: 16px;
    border-left: 4px solid var(--primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

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

.content-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 28px 0 8px;
}

.content-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    margin: 20px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.content-card p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.content-card .intro-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* ============================================
   Links
   ============================================ */
.content-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.content-card a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

/* ============================================
   Lists
   ============================================ */
.content-card ul {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
}

.content-card ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.content-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--primary-light);
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.content-card ul li:hover::before {
    background-color: var(--primary);
}

.content-card ul li p {
    margin-bottom: 4px;
}

.content-card strong {
    color: var(--text);
    font-weight: 700;
}

/* ============================================
   Section Divider
   ============================================ */
.content-card hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 32px 0;
}

/* ============================================
   Subscription Info Box
   ============================================ */
.subscription-box {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, rgba(178, 235, 242, 0.3) 100%);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin: 32px 0;
}

.subscription-box h2 {
    border-left-color: var(--accent);
    margin-top: 0;
}

/* ============================================
   Footer
   ============================================ */
.legal-footer {
    background-color: var(--text);
    color: rgba(255, 255, 255, 0.7);
    padding: 24px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: auto;
}

.legal-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.legal-footer a:hover {
    color: #fff;
}

/* ============================================
   Responsive — Tablet
   ============================================ */
@media (max-width: 768px) {
    .legal-header {
        padding: 0 16px;
    }

    .legal-header-inner {
        height: 52px;
    }

    .legal-header-brand span {
        font-size: 1.1rem;
    }

    .legal-header-back {
        font-size: 0.82rem;
        padding: 6px 12px;
    }

    .legal-hero {
        padding: 40px 20px 36px;
    }

    .legal-hero h1 {
        font-size: 1.75rem;
    }

    .legal-container {
        padding: 24px 16px 48px;
    }

    .content-card {
        padding: 32px 24px;
        border-radius: var(--radius-lg);
    }

    .content-card h2 {
        font-size: 1.2rem;
        margin-top: 32px;
    }

    .content-card h3 {
        font-size: 1rem;
    }

    .subscription-box {
        padding: 24px 20px;
    }
}

/* ============================================
   Responsive — Mobile
   ============================================ */
@media (max-width: 480px) {
    .legal-header-inner {
        height: 48px;
    }

    .legal-header-brand img {
        width: 28px;
        height: 28px;
    }

    .legal-header-brand span {
        font-size: 1rem;
    }

    .legal-header-back span {
        display: none;
    }

    .legal-hero {
        padding: 32px 16px 28px;
    }

    .legal-hero h1 {
        font-size: 1.45rem;
    }

    .legal-hero .updated-date {
        font-size: 0.82rem;
    }

    .legal-container {
        padding: 16px 12px 40px;
    }

    .content-card {
        padding: 24px 18px;
        border-radius: var(--radius-md);
    }

    .content-card h2 {
        font-size: 1.1rem;
        padding-left: 12px;
    }

    .content-card p,
    .content-card ul li {
        font-size: 0.9rem;
    }

    .subscription-box {
        padding: 20px 16px;
    }
}