/*
 * ZendaSoftware Design System
 * Site-wide reusable component contract
 *
 * Prefix: zds-
 *
 * This layer intentionally avoids generic:
 * .btn
 * .card
 * .modal
 * .dropdown
 *
 * so Zenda and FlyonUI can coexist safely.
 */


/* ==========================================================
   PAGE SHELL
   ========================================================== */

.zds-page {
    position: relative;
    min-height: 100vh;
    background: var(--bg);
    color: var(--fg);
}

.zds-shell {
    width: min(100% - 40px, 1200px);
    margin-inline: auto;
}

.zds-section {
    position: relative;
    padding-block: 96px;
}

.zds-section-compact {
    padding-block: 64px;
}


/* ==========================================================
   TYPOGRAPHY
   ========================================================== */

.zds-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;

    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;

    color: #a898ff;
}

.zds-eyebrow::before {
    content: "";
    width: 20px;
    height: 1px;

    background: currentColor;
    opacity: .8;
}

.zds-title {
    margin-top: 16px;

    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: clamp(2.3rem, 5vw, 4.7rem);
    line-height: 1.04;
    letter-spacing: -.045em;
    font-weight: 800;

    color: var(--fg);
}

.zds-section-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -.04em;
    font-weight: 800;

    color: var(--fg);
}

.zds-lead {
    max-width: 720px;
    margin-top: 20px;

    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.8;

    color: var(--fg-2);
}

.zds-copy {
    color: var(--fg-2);
    line-height: 1.8;
}


/* ==========================================================
   BREADCRUMBS
   ========================================================== */

.zds-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    font-size: .78rem;
    color: var(--fg-3);
}

.zds-breadcrumbs a {
    color: var(--fg-2);
    transition: color .2s ease;
}

.zds-breadcrumbs a:hover {
    color: #a898ff;
}

.zds-breadcrumbs-separator {
    opacity: .5;
}


/* ==========================================================
   PAGE HERO
   ========================================================== */

.zds-page-hero {
    position: relative;
    isolation: isolate;

    padding-top: 150px;
    padding-bottom: 100px;

    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.zds-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;

    background:
        radial-gradient(
            700px circle at 15% 20%,
            rgba(124,92,255,.19),
            transparent 58%
        ),
        radial-gradient(
            600px circle at 85% 55%,
            rgba(34,211,238,.10),
            transparent 62%
        );
}

.zds-page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);

    background-size: 64px 64px;

    -webkit-mask-image:
        linear-gradient(to bottom, #000, transparent 86%);
    mask-image:
        linear-gradient(to bottom, #000, transparent 86%);

    opacity: .55;
}


/* ==========================================================
   SURFACES
   ========================================================== */

.zds-panel {
    position: relative;

    background:
        linear-gradient(
            145deg,
            color-mix(in srgb, var(--surface) 96%, #7c5cff 4%),
            var(--surface)
        );

    border: 1px solid var(--line);
    border-radius: 22px;

    box-shadow:
        0 24px 70px -40px rgba(74,47,160,.38);

    transition:
        transform .3s cubic-bezier(.2,.7,.2,1),
        border-color .3s ease,
        box-shadow .3s ease;
}

.zds-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(124,92,255,.35);

    box-shadow:
        0 28px 80px -38px rgba(124,92,255,.48);
}

.zds-panel-body {
    padding: 28px;
}


/* ==========================================================
   FEATURE GRID
   ========================================================== */

.zds-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.zds-feature-icon {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background:
        linear-gradient(
            145deg,
            rgba(124,92,255,.20),
            rgba(34,211,238,.08)
        );

    border: 1px solid rgba(124,92,255,.25);

    color: #a898ff;
}

.zds-feature-title {
    margin-top: 20px;

    color: var(--fg);
    font-weight: 700;
    font-size: 1rem;
}

.zds-feature-copy {
    margin-top: 8px;

    color: var(--fg-2);
    font-size: .88rem;
    line-height: 1.7;
}


/* ==========================================================
   METRICS
   ========================================================== */

.zds-metrics {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}

.zds-metric {
    padding: 22px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.zds-metric-value {
    font-family: "JetBrains Mono", monospace;
    color: var(--fg);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.zds-metric-label {
    margin-top: 5px;

    color: var(--fg-3);
    font-size: .76rem;
    font-weight: 600;
}


/* ==========================================================
   CTA
   ========================================================== */

.zds-cta {
    position: relative;

    padding: 48px;

    border-radius: 28px;
    border: 1px solid rgba(124,92,255,.25);

    overflow: hidden;

    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(124,92,255,.28),
            transparent 45%
        ),
        radial-gradient(
            circle at 100% 100%,
            rgba(34,211,238,.15),
            transparent 45%
        ),
        var(--surface);
}

.zds-cta::after {
    content: "";
    position: absolute;

    width: 240px;
    height: 240px;

    border-radius: 50%;

    right: -100px;
    top: -120px;

    background: rgba(124,92,255,.18);
    filter: blur(50px);

    pointer-events: none;
}


/* ==========================================================
   CONTENT / POLICY PAGES
   ========================================================== */

.zds-prose {
    max-width: 860px;

    color: var(--fg-2);
    font-size: .96rem;
    line-height: 1.85;
}

.zds-prose h2,
.zds-prose h3,
.zds-prose h4 {
    color: var(--fg);

    font-family:
        "Plus Jakarta Sans",
        Inter,
        sans-serif;

    letter-spacing: -.025em;
}

.zds-prose h2 {
    margin-top: 48px;
    margin-bottom: 18px;

    font-size: 1.75rem;
}

.zds-prose h3 {
    margin-top: 34px;
    margin-bottom: 14px;

    font-size: 1.3rem;
}

.zds-prose p {
    margin-block: 14px;
}

.zds-prose ul,
.zds-prose ol {
    padding-inline-start: 22px;
    margin-block: 16px;
}

.zds-prose a {
    color: #a898ff;
}


/* ==========================================================
   RTL CONTRACT
   ========================================================== */

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

html[dir="rtl"] .zds-eyebrow::before {
    order: 2;
}

html[dir="rtl"] .zds-breadcrumbs {
    direction: rtl;
}

html[dir="rtl"] .zds-page-hero::before {
    transform: scaleX(-1);
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 990px) {

    .zds-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .zds-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 640px) {

    .zds-shell {
        width: min(100% - 30px, 1200px);
    }

    .zds-section {
        padding-block: 72px;
    }

    .zds-page-hero {
        padding-top: 122px;
        padding-bottom: 72px;
    }

    .zds-grid {
        grid-template-columns: 1fr;
    }

    .zds-panel-body {
        padding: 22px;
    }

    .zds-cta {
        padding: 30px 24px;
        border-radius: 22px;
    }

}


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

    .zds-panel {
        transition: none;
    }

    .zds-panel:hover {
        transform: none;
    }

}


/* ==========================================================
   ZS-6J-R1 — GLOBAL MOBILE-FIRST SAFETY CONTRACT
   ========================================================== */

.zds-page,
.zds-shell,
.zds-section,
.zds-page-hero,
.zds-panel,
.zds-panel-body,
.zds-grid,
.zds-metrics,
.zds-cta,
.zds-prose {
    min-width: 0;
}

.zds-page img {
    max-width: 100%;
}

html,
body {
    max-width: 100%;
}

body {
    overflow-x: clip;
}


/*
 * Intermediate/mobile breakpoint.
 *
 * This deliberately starts above the old 640px breakpoint.
 * Modern phones, browser emulators, zoomed viewports and
 * narrow tablets should all receive the safe layout.
 */
@media (max-width: 820px) {

    .zds-shell {
        width: calc(100% - 28px);
        max-width: 100%;
    }

    .zds-page-hero {
        padding-top: 118px;
        padding-bottom: 68px;
    }

    .zds-section {
        padding-block: 68px;
    }

    .zds-section-compact {
        padding-block: 52px;
    }

    .zds-grid,
    .zds-metrics {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .zds-panel,
    .zds-panel-body,
    .zds-cta {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .zds-title {
        font-size:
            clamp(
                2rem,
                10vw,
                3.25rem
            );

        line-height: 1.06;
    }

    .zds-section-title {
        font-size:
            clamp(
                1.75rem,
                8.6vw,
                2.65rem
            );

        line-height: 1.12;
    }

}


@media (max-width: 480px) {

    .zds-shell {
        width: calc(100% - 22px);
    }

    .zds-page-hero {
        padding-top: 108px;
        padding-bottom: 58px;
    }

    .zds-section {
        padding-block: 58px;
    }

    .zds-panel-body {
        padding: 20px;
    }

    .zds-cta {
        padding: 26px 20px;
    }

}
