/* =========================================================
   DYNAMO DEV — Legal Pages
   Privacy Policy + Terms & Conditions
   ========================================================= */

.legal-page {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle at 80% 8%, rgba(63, 74, 255, 0.13), transparent 30%),
        radial-gradient(circle at 15% 30%, rgba(30, 84, 255, 0.07), transparent 28%),
        #05070d;
    color: #f7f8fc;
    overflow: hidden;
}

.legal-container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

/* HERO */

.legal-hero {
    position: relative;
    padding: 170px 0 90px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.legal-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(to bottom, black, transparent);
}

.legal-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(90px);
    pointer-events: none;
}

.legal-glow-one {
    width: 380px;
    height: 380px;
    right: 8%;
    top: -130px;
    background: rgba(57, 70, 255, 0.16);
}

.legal-glow-two {
    width: 300px;
    height: 300px;
    left: -100px;
    bottom: -180px;
    background: rgba(34, 98, 255, 0.09);
}

.legal-hero .legal-container {
    position: relative;
    z-index: 2;
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: #6877ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.22em;
}

.legal-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}

.legal-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(48px, 7vw, 92px);
    line-height: 0.98;
    letter-spacing: -0.055em;
    font-weight: 800;
    color: #fff;
}

.legal-hero h1 span {
    background: linear-gradient(110deg, #fff 5%, #7181ff 55%, #4960ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.legal-intro {
    max-width: 720px;
    margin: 30px 0 0;
    color: rgba(226, 231, 244, 0.67);
    font-size: 17px;
    line-height: 1.8;
}

.legal-updated {
    display: inline-flex;
    margin-top: 28px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(222, 227, 241, 0.48);
    font-size: 12px;
}

/* CONTENT */

.legal-content {
    position: relative;
    padding: 90px 0 130px;
}

.legal-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 80px;
    align-items: start;
}

/* SIDEBAR */

.legal-sidebar {
    position: relative;
}

.legal-sidebar-card {
    position: sticky;
    top: 120px;
    padding: 24px 20px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.015)
        );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.legal-sidebar-title {
    display: block;
    margin-bottom: 17px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.legal-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.legal-sidebar nav a {
    position: relative;
    display: block;
    padding: 10px 12px;
    border-radius: 9px;
    color: rgba(224, 228, 241, 0.55);
    font-size: 12px;
    line-height: 1.35;
    text-decoration: none;
    transition:
        color .25s ease,
        background .25s ease,
        transform .25s ease;
}

.legal-sidebar nav a:hover {
    color: #fff;
    background: rgba(86, 102, 255, 0.09);
    transform: translateX(3px);
}

/* ARTICLE */

.legal-article {
    min-width: 0;
}

.legal-section {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 24px;
    padding: 0 0 58px;
    margin: 0 0 58px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    scroll-margin-top: 130px;
}

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

.legal-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(93, 111, 255, 0.23);
    border-radius: 12px;
    background: rgba(68, 83, 255, 0.06);
    color: #6577ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.legal-section h2 {
    margin: 3px 0 20px;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.035em;
    font-weight: 750;
}

.legal-section p {
    max-width: 800px;
    margin: 0 0 17px;
    color: rgba(219, 225, 240, 0.64);
    font-size: 15px;
    line-height: 1.85;
}

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

.legal-section ul {
    display: grid;
    gap: 11px;
    padding: 5px 0 8px;
    margin: 0 0 18px;
    list-style: none;
}

.legal-section li {
    position: relative;
    padding-left: 26px;
    color: rgba(219, 225, 240, 0.64);
    font-size: 15px;
    line-height: 1.7;
}

.legal-section li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5e72ff;
    box-shadow: 0 0 15px rgba(94, 114, 255, 0.45);
}

/* CONTACT CTA */

.legal-contact-section {
    padding: 38px;
    border: 1px solid rgba(93, 111, 255, 0.16);
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 10%, rgba(80, 94, 255, .12), transparent 38%),
        rgba(255,255,255,.018);
}

.legal-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 48px;
    margin-top: 12px;
    padding: 0 20px;
    border: 1px solid rgba(103, 119, 255, 0.34);
    border-radius: 12px;
    background: rgba(82, 98, 255, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform .25s ease,
        background .25s ease,
        border-color .25s ease;
}

.legal-contact-button span {
    font-size: 18px;
    transition: transform .25s ease;
}

.legal-contact-button:hover {
    transform: translateY(-2px);
    background: rgba(82, 98, 255, 0.17);
    border-color: rgba(103, 119, 255, 0.55);
}

.legal-contact-button:hover span {
    transform: translateX(4px);
}

/* TABLET */

@media (max-width: 1024px) {
    .legal-hero {
        padding: 150px 0 75px;
    }

    .legal-layout {
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 45px;
    }

    .legal-content {
        padding-top: 70px;
    }
}

/* MOBILE */

@media (max-width: 767px) {
    .legal-container {
        width: min(100% - 32px, 1180px);
    }

    .legal-hero {
        padding: 125px 0 60px;
    }

    .legal-hero h1 {
        font-size: clamp(42px, 13vw, 64px);
    }

    .legal-intro {
        margin-top: 22px;
        font-size: 15px;
        line-height: 1.7;
    }

    .legal-layout {
        display: block;
    }

    .legal-sidebar {
        margin-bottom: 50px;
    }

    .legal-sidebar-card {
        position: relative;
        top: auto;
        padding: 18px;
    }

    .legal-sidebar nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .legal-sidebar nav a {
        padding: 9px 8px;
        font-size: 11px;
    }

    .legal-content {
        padding: 55px 0 90px;
    }

    .legal-section {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-bottom: 42px;
        margin-bottom: 42px;
        scroll-margin-top: 100px;
    }

    .legal-number {
        width: 38px;
        height: 38px;
    }

    .legal-section h2 {
        margin-top: 0;
        font-size: 26px;
    }

    .legal-section p,
    .legal-section li {
        font-size: 14px;
    }

    .legal-contact-section {
        padding: 25px 20px;
    }
}

/* SMALL MOBILE */

@media (max-width: 420px) {
    .legal-container {
        width: calc(100% - 24px);
    }

    .legal-sidebar nav {
        grid-template-columns: 1fr;
    }

    .legal-hero {
        padding-top: 115px;
    }

    .legal-updated {
        font-size: 11px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
    .legal-sidebar nav a,
    .legal-contact-button,
    .legal-contact-button span {
        transition: none;
    }
}


/* =========================================================
   ARABIC / RTL
   ========================================================= */

html[dir="rtl"] .legal-page {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .legal-eyebrow {
    flex-direction: row;
}

html[dir="rtl"] .legal-sidebar nav a {
    text-align: right;
}

html[dir="rtl"] .legal-sidebar nav a:hover {
    transform: translateX(-3px);
}

html[dir="rtl"] .legal-section li {
    padding-left: 0;
    padding-right: 26px;
}

html[dir="rtl"] .legal-section li::before {
    left: auto;
    right: 2px;
}

html[dir="rtl"] .legal-contact-button {
    flex-direction: row;
}

html[dir="rtl"] .legal-contact-button .legal-arrow {
    transform: rotate(180deg);
}

html[dir="rtl"] .legal-contact-button:hover .legal-arrow {
    transform: rotate(180deg) translateX(4px);
}

html[dir="rtl"] .legal-hero h1,
html[dir="rtl"] .legal-intro,
html[dir="rtl"] .legal-section h2,
html[dir="rtl"] .legal-section p {
    text-align: right;
}

html[dir="rtl"] .legal-sidebar-title {
    text-align: right;
}