@property --bg-start {
    syntax: '<color>';
    inherits: true;
    initial-value: #8cabff;
}

@property --bg-end {
    syntax: '<color>';
    inherits: true;
    initial-value: #7450f6;
}

@property --bg-color {
    syntax: '<color>';
    inherits: true;
    initial-value: #816bf7;
}

:root {
    /* Mirrored from root styles.css for isolation but visual consistency */
    --bg-color: #816bf7;
    --bg-start: #8cabff;
    --bg-end: #7450f6;

    --text-color: #ffffff;
    --faded-text: rgba(255, 255, 255, 0.4);
    --font-main: 'Inter', system-ui, sans-serif;
    --transition-speed: 0.8s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Global Layout */
html {
    background-color: var(--bg-color);
    min-height: 100vh;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 900px;
    width: 100%;
    margin: 8rem 0 6rem;
    padding: 0 3rem;
    position: relative;
    z-index: 1;
}

/* Fixed Top Navigation Header */
body > header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 3rem 4rem; /* Increased bottom padding for the fade area */
    background: linear-gradient(
        to bottom,
        var(--bg-color) 40%,
        transparent 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;

    /* Seamless Fade Mask */
    mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    pointer-events: none; /* Let clicks pass through the faded area */
}

/* Fixed Top Navigation Header Content */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    width: 100%;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.6rem;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 42px;
    height: 42px;
    pointer-events: auto; /* Ensure clickable */
}

.nav-button:hover {
    background: white;
    color: #7450f6;
    border-color: white;
    transform: translateY(-1px);
}

.logo-link {
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.main-logo {
    width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* Re-enable clicks for nav content */
body > header nav {
    pointer-events: auto;
}

/* Fixed Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 3rem 1.5rem; /* Increased top padding for the fade area */
    background: linear-gradient(to top, var(--bg-color) 40%, transparent 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;

    /* Seamless Fade Mask */
    mask-image: linear-gradient(to top, black 65%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 65%, transparent 100%);
    pointer-events: none;
}

/* Bottom Nav Content */
.bottom-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2.5rem;
    width: 100%;
    pointer-events: auto;
}

.bottom-nav a {
    text-decoration: none;
    color: var(--link-color);
    opacity: 0.7;
    font-weight: 700;
    font-size: 1.1rem;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

.bottom-nav a:hover {
    opacity: 1;
}

/* Policy Content refinements */
.policy-header {
    margin-bottom: 4rem;
}

.policy-header h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.last-updated {
    font-size: clamp(1.2rem, 3vw, 1.25rem);
    font-weight: 400;
    color: var(--text-color);
    opacity: 0.95;
}

/* Content Area */
.policy-content {
    font-size: 1.5rem;
    line-height: 1.6;
    max-width: 800px;
    margin-bottom: 6rem;
}

.policy-content p {
    font-size: 1.15rem; /* Exact match to root .text-content p */
    line-height: 1.4;
    font-weight: 300;
    margin-bottom: 2rem;
}

.policy-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 4rem;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.policy-content a {
    color: var(--text-color);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.policy-content a:hover {
    opacity: 0.8;
}

.policy-content ol {
    list-style-position: outside;
    padding-left: 2rem;
    margin-bottom: 4rem;
}

.policy-content li {
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
}

.policy-content li::marker {
    font-weight: 700;
    color: var(--text-color);
}

.policy-content strong {
    font-weight: 700;
}

.policy-content .bold {
    font-weight: 700;
}

.policy-content .italic {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.95rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .policy-header h1 {
        font-size: 2rem;
    }

    .policy-content {
        font-size: 1.5rem;
    }

    .policy-content h2 {
        font-size: 1.5rem;
    }
}
