/*!
 * Developer Documentation Hub — v3.0
 * UX4G Design System
 *
 * Scoped page styles. Consumes the design system's own tokens
 * (colors, radii, type) from ux4g-v2.0.css / scss/themes/_variables.scss
 * so the page stays native to the system. A few local tokens below
 * are page-specific compositions of those primitives.
 */

.ddh {
    --ddh-ink: #1b1830;
    --ddh-ink-soft: #4a4667;
    --ddh-ink-muted: #6c6a86;
    --ddh-line: #e7e4f2;
    --ddh-surface: #ffffff;
    --ddh-surface-soft: #f7f6fd;
    --ddh-brand: var(--bs-primary, #613af5);
    --ddh-brand-strong: #4a2997;
    --ddh-brand-deep: #1e1465;
    --ddh-brand-tint: #efebfb;
    --ddh-radius: 18px;
    --ddh-radius-sm: 12px;
    --ddh-ease: cubic-bezier(0.22, 1, 0.36, 1);

    color: var(--ddh-ink);
    background: var(--ddh-surface);
}

.ddh a {
    text-decoration: none;
}

.ddh-container {
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* ---------------------------------------------------------------- */
/* Hero — committed color: purple carries the surface.              */
/* Full-bleed band that sits flush under the fixed site header.     */
/* ---------------------------------------------------------------- */

.ddh-hero {
    position: relative;
    overflow: hidden;
    /* Contain inner z-index so hero content never paints over the fixed site header. */
    isolation: isolate;
    padding: 84px 0 88px;
    color: #fff;
    background:
        radial-gradient(120% 120% at 82% -10%, rgba(151, 122, 255, 0.55) 0%, rgba(151, 122, 255, 0) 55%),
        radial-gradient(90% 90% at 0% 110%, rgba(30, 20, 101, 0.6) 0%, rgba(30, 20, 101, 0) 60%),
        linear-gradient(135deg, #1e1465 0%, #4a2997 48%, #613af5 100%);
}

/* faint dot texture, non-decorative-as-content */
.ddh-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 70%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.ddh-hero .ddh-container {
    position: relative;
    z-index: 1;
}

.ddh-hero__inner {
    max-width: 720px;
}

.ddh-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ddh-hero__tag::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6ff0c0;
    box-shadow: 0 0 0 4px rgba(111, 240, 192, 0.25);
}

.ddh-hero__title {
    margin: 0 0 18px;
    font-size: clamp(2.1rem, 4.6vw, 3.2rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: #fff;
}

.ddh-hero__lead {
    margin: 0 0 14px;
    max-width: 62ch;
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.94);
}

.ddh-hero__sub {
    margin: 0 0 32px;
    max-width: 60ch;
    font-size: 0.98rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.ddh-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Buttons */
.ddh-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 24px;
    border-radius: 100px;
    font-size: 0.98rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.25s var(--ddh-ease), background 0.25s var(--ddh-ease), color 0.25s var(--ddh-ease), border-color 0.25s var(--ddh-ease);
}

.ddh-btn svg {
    width: 17px;
    height: 17px;
}

.ddh-btn--primary {
    background: #fff;
    color: var(--ddh-brand-strong);
}

.ddh-btn--primary:hover {
    background: #fff;
    color: var(--ddh-brand-deep);
    transform: translateY(-2px);
}

.ddh-btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff;
}

.ddh-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.ddh-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* ---------------------------------------------------------------- */
/* Section scaffolding                                              */
/* ---------------------------------------------------------------- */

.ddh-section {
    padding: 60px 0;
}

.ddh-section__head {
    max-width: 620px;
    margin: 0 0 34px;
}

.ddh-eyebrow {
    display: block;
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ddh-brand);
}

.ddh-section__title {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 2.6vw, 1.95rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ddh-ink);
}

.ddh-section__desc {
    margin: 0;
    max-width: 62ch;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ddh-ink-soft);
}

/* ---------------------------------------------------------------- */
/* Featured platform (Web) — asymmetric, not a plain card           */
/* ---------------------------------------------------------------- */

.ddh-featured {
    display: grid;
    grid-template-columns: 1.05fr 1.35fr;
    gap: 0;
    border: 1px solid var(--ddh-line);
    border-radius: var(--ddh-radius);
    overflow: hidden;
    background: var(--ddh-surface);
    box-shadow: 0 1px 2px rgba(27, 24, 48, 0.04), 0 18px 40px -24px rgba(27, 24, 48, 0.28);
}

.ddh-featured__main {
    padding: 40px;
    background:
        radial-gradient(90% 70% at 0% 0%, rgba(97, 58, 245, 0.06) 0%, rgba(97, 58, 245, 0) 60%),
        var(--ddh-surface);
    border-right: 1px solid var(--ddh-line);
    display: flex;
    flex-direction: column;
}

.ddh-featured__icon {
    display: inline-flex;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.ddh-featured__icon svg {
    width: 100%;
    height: 100%;
}

.ddh-featured__title {
    margin: 0 0 12px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ddh-ink);
}

.ddh-featured__desc {
    margin: 0 0 26px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ddh-ink-soft);
}

.ddh-featured__cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    margin-top: auto;
    color: var(--ddh-brand);
    font-weight: 700;
    font-size: 0.98rem;
}

.ddh-featured__cta svg {
    width: 15px;
    height: 15px;
    transition: transform 0.25s var(--ddh-ease);
}

.ddh-featured__cta:hover svg {
    transform: translate(2px, -2px);
}

.ddh-featured__cta:focus-visible {
    outline: 3px solid var(--ddh-brand);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Aside: framework variant tiles */
.ddh-featured__aside {
    padding: 28px;
    background: var(--ddh-surface-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ddh-featured__asidehead {
    margin: 4px 4px 4px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ddh-ink-muted);
}

.ddh-variant {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: var(--ddh-surface);
    border: 1px solid var(--ddh-line);
    border-radius: var(--ddh-radius-sm);
    color: var(--ddh-ink);
    transition: transform 0.25s var(--ddh-ease), border-color 0.25s var(--ddh-ease), box-shadow 0.25s var(--ddh-ease);
}

.ddh-variant__logo {
    display: inline-flex;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--ddh-surface-soft);
}

.ddh-variant__logo svg {
    width: 24px;
    height: 24px;
}

.ddh-variant__body {
    flex: 1;
    min-width: 0;
}

.ddh-variant__name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.ddh-variant__meta {
    display: block;
    font-size: 0.83rem;
    color: var(--ddh-ink-muted);
}

.ddh-variant__arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--ddh-ink-muted);
    transition: transform 0.25s var(--ddh-ease), color 0.25s var(--ddh-ease);
}

a.ddh-variant:hover {
    transform: translateX(4px);
    border-color: var(--ddh-brand);
    box-shadow: 0 10px 24px -14px rgba(97, 58, 245, 0.5);
}

a.ddh-variant:hover .ddh-variant__arrow {
    color: var(--ddh-brand);
    transform: translateX(3px);
}

a.ddh-variant:focus-visible {
    outline: 3px solid var(--ddh-brand);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------- */
/* Platform grid (mobile group)                                     */
/* ---------------------------------------------------------------- */

.ddh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.ddh-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    background: var(--ddh-surface);
    border: 1px solid var(--ddh-line);
    border-radius: var(--ddh-radius);
    color: inherit;
    transition: transform 0.25s var(--ddh-ease), border-color 0.25s var(--ddh-ease), box-shadow 0.25s var(--ddh-ease);
}

a.ddh-card:hover {
    transform: translateY(-5px);
    border-color: var(--ddh-brand);
    box-shadow: 0 22px 44px -24px rgba(27, 24, 48, 0.4);
}

a.ddh-card:focus-visible {
    outline: 3px solid var(--ddh-brand);
    outline-offset: 3px;
}

.ddh-card__icon {
    display: inline-flex;
    width: 50px;
    height: 50px;
}

.ddh-card__icon svg {
    width: 100%;
    height: 100%;
}

.ddh-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ddh-ink);
}

.ddh-card__desc {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--ddh-ink-soft);
}

.ddh-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ddh-tag {
    padding: 4px 12px;
    background: var(--ddh-brand-tint);
    color: var(--ddh-brand-strong);
    border-radius: 100px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ddh-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: auto;
    padding: 11px 20px;
    background: var(--ddh-brand);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 100px;
    transition: background 0.25s var(--ddh-ease);
}

a.ddh-card:hover .ddh-card__cta {
    background: var(--ddh-brand-deep);
}

.ddh-card__cta svg {
    width: 14px;
    height: 14px;
}

/* disabled / coming soon */
.ddh-card--soon {
    background: var(--ddh-surface-soft);
    border-style: dashed;
}

.ddh-card--soon .ddh-card__icon {
    opacity: 0.85;
}

.ddh-chip-soon {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: auto;
    padding: 6px 14px;
    background: #edecf3;
    border-radius: 100px;
    color: #565471;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ddh-card__pill {
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 100px;
    background: #edecf3;
    color: #565471;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---------------------------------------------------------------- */
/* Resources / need help                                            */
/* ---------------------------------------------------------------- */

.ddh-resources {
    padding: 46px;
    border-radius: var(--ddh-radius);
    background:
        radial-gradient(80% 120% at 100% 0%, rgba(97, 58, 245, 0.08) 0%, rgba(97, 58, 245, 0) 55%),
        var(--ddh-surface-soft);
    border: 1px solid var(--ddh-line);
}

.ddh-resources__title {
    margin: 0 0 10px;
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 700;
    color: var(--ddh-ink);
}

.ddh-resources__desc {
    margin: 0 0 26px;
    max-width: 60ch;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ddh-ink-soft);
}

.ddh-resources__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ddh-reslink {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    border: 1px solid var(--ddh-line);
    border-radius: 100px;
    background: var(--ddh-surface);
    color: var(--ddh-ink);
    font-weight: 600;
    font-size: 0.92rem;
    transition: border-color 0.25s var(--ddh-ease), color 0.25s var(--ddh-ease), transform 0.25s var(--ddh-ease);
}

.ddh-reslink svg {
    width: 15px;
    height: 15px;
    color: var(--ddh-ink-muted);
    transition: color 0.25s var(--ddh-ease);
}

a.ddh-reslink:hover {
    border-color: var(--ddh-brand);
    color: var(--ddh-brand);
    transform: translateY(-2px);
}

a.ddh-reslink:hover svg {
    color: var(--ddh-brand);
}

a.ddh-reslink:focus-visible {
    outline: 3px solid var(--ddh-brand);
    outline-offset: 2px;
}

.ddh-reslink--soon {
    color: var(--ddh-ink-muted);
    cursor: default;
}

.ddh-reslink__soon {
    padding: 2px 9px;
    border-radius: 100px;
    background: #edecf3;
    color: #565471;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---------------------------------------------------------------- */
/* Responsive                                                       */
/* ---------------------------------------------------------------- */

@media (max-width: 900px) {
    .ddh-featured {
        grid-template-columns: 1fr;
    }

    .ddh-featured__main {
        border-right: 0;
        border-bottom: 1px solid var(--ddh-line);
    }
}

@media (max-width: 768px) {
    .ddh-container {
        padding-inline: 18px;
    }

    .ddh-hero {
        padding: 56px 0 62px;
    }

    .ddh-section {
        padding: 46px 0;
    }

    .ddh-featured__main,
    .ddh-resources {
        padding: 30px 24px;
    }
}

@media (max-width: 560px) {
    .ddh-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ddh-btn {
        justify-content: center;
    }

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

/* ---------------------------------------------------------------- */
/* Header: single menu toggle, aligned to the right on collapsed    */
/* (mobile / tablet) nav. Scoped to the hub via this stylesheet.    */
/* ---------------------------------------------------------------- */

@media (max-width: 991px) {
    .nav_custom .navbar-toggler {
        order: 5;
        margin-left: auto;
    }
}

/* ---------------------------------------------------------------- */
/* In-page anchor offset (fixed site header) + smooth scroll        */
/* ---------------------------------------------------------------- */

.ddh [id] {
    scroll-margin-top: 124px;
}

@media (prefers-reduced-motion: no-preference) {
    html:has(.ddh) {
        scroll-behavior: smooth;
    }
}

/* ---------------------------------------------------------------- */
/* Reduced motion                                                   */
/* ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .ddh * {
        transition: none !important;
    }

    a.ddh-card:hover,
    a.ddh-variant:hover,
    .ddh-btn:hover {
        transform: none;
    }
}
