﻿/* ==========================================================================
   Qlynic · Legal pages stylesheet (Privacy, Terms)
   - Solid page background (no global radial gradients)
   - Per-section top-anchored gradient band, clipped to glass card
   - Optional, tasteful glow for selected sections (hero, security)
   - “Matte glass” cards with subtle depth
   - Each major block includes its own responsive @media rules
   ========================================================================== */

/* Root & base
   -------------------------------------------------------------------------- */
:root {
    /* Base colors */
    --page-bg: #0b1022;
    --text: #e7eaf3;
    --muted: #a6b0c2;
    --line: rgba(148,163,184,.22);
    /* Brand accents */
    --primary: #A78BFA;
    --accent: #22D3EE;
    --ok: #34D399;
    --warn: #fbbf24;
    /* Surfaces */
    --glass-bg: linear-gradient(180deg, rgba(20,28,54,.78), rgba(13,19,38,.72));
    --card-bg: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    /* Bands (top‑anchored section gradients) */
    --band-hero: linear-gradient(180deg, rgba(64,86,158,.55) 0%, rgba(11,16,34,0) 70%);
    --band-soft: linear-gradient(180deg, rgba(42,58,110,.45) 0%, rgba(11,16,34,0) 72%);
    /* Motion, radii, shadows */
    --radius: 20px;
    --fast: .24s cubic-bezier(.2,.65,.35,1);
    --shadow: 0 18px 50px -14px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset;
    /* Focus ring */
    --focus: #22D3EE;
    /* Font */
    --font: Poppins,system-ui,Segoe UI,Roboto,Arial,sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    background: var(--page-bg); /* fixed: no page-wide gradients */
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4 {
    font-weight: 900;
    letter-spacing: .3px;
}

p {
    line-height: 1.55;
}

/* ========================================================================== */
/* Header (legal-nav)                                                         */
/* ========================================================================== */

.legal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legal-nav {
    position: sticky;
    top: 0;
    z-index: 70;
    background: rgba(10,14,28,.60);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .brand .logo {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        background: url(../Images/CompanyLogo.svg) center/cover no-repeat;
    }

    .brand .name {
        font-weight: 900;
        font-size: 1.05rem;
        letter-spacing: .25px;
    }

.lnk-set {
    display: flex;
    gap: 18px;
}

    .lnk-set a {
        font-weight: 600;
        padding: 8px 10px;
        border-radius: 10px;
        color: #dbe3f1;
        transition: background var(--fast), color var(--fast), transform var(--fast);
    }

        .lnk-set a[aria-current="page"] {
            background: linear-gradient(135deg,#7C3AED,#22D3EE);
            color: #0d1222;
            font-weight: 800;
            box-shadow: 0 10px 26px -10px rgba(99,102,241,.45);
        }

        .lnk-set a:hover {
            background: rgba(255,255,255,.08);
        }

/* Header: responsive */
@media (max-width:760px) {
    .nav-inner {
        padding: 10px 14px;
    }

    .lnk-set {
        gap: 12px;
    }

        .lnk-set a {
            padding: 6px 8px;
            font-size: .86rem;
        }
}

/* ========================================================================== */
/* Sections (shared layout)                                                   */
/* ========================================================================== */

.section {
    position: relative;
    margin: 40px auto 0;
    max-width: 1200px;
    padding: 0 16px;
}

    .section:first-of-type {
        margin-top: 26px;
    }

/* FIX: Anchor gradient band to inner glass and clip by radius */
.section-band::before {
    display: none;
}
/* disable any previous outer section band */

.section.section-band > .section-inner {
    position: relative;
    overflow: hidden; /* clip any band/glow to card radius */
}

    .section.section-band > .section-inner::before {
        content: "";
        position: absolute;
        inset: 0;
        background: var(--band-soft); /* default band */
        border-radius: inherit;
        pointer-events: none;
        z-index: 0;
    }

/* Glass “matte” card */
.section-inner {
    position: relative;
    z-index: 1;
    padding: 28px 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--glass-bg);
    backdrop-filter: saturate(160%) blur(18px);
    box-shadow: var(--shadow);
}

/* Sections: responsive */
@media (max-width:760px) {
    .section-inner {
        padding: 24px 16px;
        border-radius: 20px;
    }
}

/* ========================================================================== */
/* Section variants & tasteful ambient glows                                  */
/* ========================================================================== */

/* Hero/overview section gets a richer band + soft ambient glow */
#overview.section.section-band > .section-inner::before {
    background: var(--band-hero);
}

/* Elegant ambient glow behind content (kept subtle, clipped to radius) */
#overview .section-inner::after,
#security .section-inner::after {
    content: "";
    position: absolute;
    inset: -10% -8% -20% -8%;
    background: radial-gradient(520px 220px at 18% 0%, rgba(167,139,250,.18), transparent 65%), radial-gradient(520px 240px at 82% 8%, rgba(34,211,238,.16), transparent 70%), radial-gradient(620px 280px at 50% 100%, rgba(99,102,241,.12), transparent 75%);
    filter: blur(30px) saturate(120%);
    opacity: .9;
    z-index: 0;
    pointer-events: none;
    animation: glowDrift 26s linear infinite;
}

@keyframes glowDrift {
    0% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-3%)
    }

    100% {
        transform: translateY(0)
    }
}

/* Reduced motion: disable ambient movement */
@media (prefers-reduced-motion:reduce) {
    #overview .section-inner::after,
    #security .section-inner::after {
        animation: none;
    }
}

/* ========================================================================== */
/* Typography blocks: titles, lead, meta tags                                 */
/* ========================================================================== */

.legal-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(1.9rem,5vw,2.6rem);
    margin: 0 0 10px;
}

.lead {
    font-size: 1.05rem;
    max-width: 72ch;
    margin: 0 0 16px;
    font-weight: 500;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
    border: 1px solid var(--line);
    color: #cdd6e5;
}

@media (max-width:760px) {
    .legal-title {
        font-size: clamp(2rem,8vw,2.4rem);
    }
}

/* ========================================================================== */
/* Table of Contents                                                          */
/* ========================================================================== */

.toc {
    margin: 18px 0 4px;
    background: var(--card-bg);
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 20px;
    padding: 16px 18px;
}

.toc-title {
    margin: 0 0 10px;
    font-size: 1rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 800;
}

.toc ol {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
    font-size: .9rem;
}

.toc a {
    position: relative;
    padding: 2px 0;
    color: #dbe4f4;
    transition: color var(--fast);
}

    .toc a.active {
        color: #fff;
        font-weight: 700;
    }

    .toc a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -2px;
        height: 2px;
        width: 0;
        background: linear-gradient(90deg,#7C3AED,#22D3EE,#7C3AED);
        border-radius: 2px;
        transition: width .35s var(--fast), background-position .6s linear;
        background-size: 200% 100%;
    }

    .toc a:hover::after, .toc a.active::after {
        width: 100%;
        background-position: 100% 0;
    }

@media (max-width:760px) {
    .toc {
        padding: 14px 16px;
    }

        .toc ol {
            font-size: .88rem;
        }
}

/* ========================================================================== */
/* Cards & grids                                                              */
/* ========================================================================== */

.grid-2 {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    border: 1px solid rgba(148,163,184,.28);
    border-radius: 18px;
    background: var(--card-bg);
    padding: 16px 16px 18px;
    box-shadow: 0 14px 46px -12px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset;
    display: grid;
    gap: 10px;
}

    .card h3 {
        margin: 0;
        font-size: 1.02rem;
        font-weight: 800;
    }

    .card p, .card li {
        font-size: .9rem;
    }

.icon-list, .check-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

    .icon-list li, .check-list li {
        display: flex;
        gap: 10px;
        align-items: flex-start;
        font-size: .95rem;
    }

    .icon-list i {
        color: var(--accent);
    }

    .check-list li::before {
        content: "\f00c";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        color: var(--ok);
        margin-right: 6px;
    }

@media (max-width:760px) {
    .card {
        padding: 14px 14px 16px;
    }
}

/* ========================================================================== */
/* Notes & callouts                                                           */
/* ========================================================================== */

.note {
    margin-top: 14px;
    font-size: .9rem;
    color: #cdd6e5;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    border: 1px solid rgba(148,163,184,.25);
    padding: 12px 14px;
    border-radius: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

    .note i {
        color: var(--warn);
    }

/* ========================================================================== */
/* Sub‑processor table                                                        */
/* ========================================================================== */

.proc-table {
    margin: 16px 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    font-size: .88rem;
}

    .proc-table .row {
        display: grid;
        grid-template-columns: 1.1fr 1fr .9fr 1.2fr;
    }

        .proc-table .row > div {
            padding: 12px 14px;
            border-bottom: 1px solid rgba(148,163,184,.16);
        }

        .proc-table .row.header {
            background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
            font-weight: 800;
            letter-spacing: .04em;
            text-transform: uppercase;
        }

        .proc-table .row:last-child > div {
            border-bottom: 0;
        }

    .proc-table i {
        color: #A78BFA;
        margin-right: 6px;
    }

@media (max-width:760px) {
    .proc-table {
        font-size: .86rem;
    }

        .proc-table .row {
            grid-template-columns: .9fr .9fr .8fr 1fr;
        }
}

/* ========================================================================== */
/* Footer                                                                     */
/* ========================================================================== */

.legal-foot {
    margin: 60px 0 0;
    text-align: center;
    padding: 30px 16px 46px;
    border-top: 1px solid var(--line);
    font-size: .86rem;
    color: var(--muted);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.01));
}

    .legal-foot a {
        color: #d0d9e8;
        font-weight: 600;
    }

        .legal-foot a:hover {
            text-decoration: underline;
        }

/* ========================================================================== */
/* Accessibility & print                                                      */
/* ========================================================================== */

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 8px;
}

@media (prefers-reduced-motion:reduce) {
    .lnk-set a, .tag, .card, .toc a::after {
        transition: none;
    }
}

@media print {
    .legal-nav, .toc, .meta-line, .legal-foot {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

    .section {
        margin: 0;
        max-width: 100%;
    }

    .section-inner {
        box-shadow: none;
        background: #fff;
        border: 0;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
