/* ═══════════════════════════════════════════════════════
   INTEGRATION TEMPLATE — Page-specific styles
   Prefix: db-int-
   Extends default.css tokens
   ═══════════════════════════════════════════════════════ */

/* ─── Hero ─── */
.db-int-hero {
    position: relative;
    background: linear-gradient(160deg, #060e1f 0%, #091b36 40%, #0e1f40 100%);
    padding: 6rem 0 4rem;
    overflow: hidden;
    margin-top: -72px;
    padding-top: calc(6rem + 72px);
}

.db-int-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.db-int-hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.2;
}

.db-int-hero__orb--1 {
    width: 520px;
    height: 520px;
    background: var(--db-purple);
    top: -200px;
    right: -60px;
}

.db-int-hero__orb--2 {
    width: 380px;
    height: 380px;
    background: var(--db-blue);
    bottom: -140px;
    left: -100px;
}

.db-int-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

/* ─── Back Link ─── */
.db-int-hero__back {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.15s ease;
}

.db-int-hero__back:hover {
    color: #94a3b8;
}

.db-int-hero__back svg {
    width: 14px;
    height: 14px;
}

/* ─── Badge ─── */
.db-int-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(147,51,234,0.1);
    border: 1px solid rgba(147,51,234,0.2);
    border-radius: 100px;
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #c084fc;
    margin-bottom: 1.5rem;
}

/* ─── H1 ─── */
.db-int-hero h1 {
    font-family: var(--db-font-display);
    font-size: clamp(2rem, 4.5vw, 3.125rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: #ffffff;
    margin: 0 0 1.25rem;
}

.db-int-hero h1 span {
    background: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Meta ─── */
.db-int-hero__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.db-int-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #64748b;
}

.db-int-hero__meta-item svg {
    width: 15px;
    height: 15px;
    opacity: 0.6;
}

/* ─── Summary ─── */
.db-int-hero__summary {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #94a3b8;
    margin: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.db-int-hero__summary a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.db-int-hero__summary a:hover {
    color: #bfdbfe;
}

/* ─── Featured Image ─── */
.db-int-image {
    padding: 0 0 3rem;
    background: var(--db-bg-alt);
}

.db-int-image__frame {
    max-width: 560px;
    margin: -2rem auto 0;
    border-radius: var(--db-radius-lg);
    overflow: hidden;
    box-shadow: var(--db-shadow-lg);
    border: 1px solid var(--db-border);
}

.db-int-image__frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* Constrain images inside content body */
.db-int-body__content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--db-radius);
}

.db-int-body__content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ─── Layout: Sidebar + Content ─── */
.db-int-layout {
    padding: 3.5rem 0 5rem;
}

.db-int-layout__grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* ─── Sticky Sidebar ToC ─── */
.db-int-sidebar {
    position: relative;
}

.db-int-toc__box {
    position: sticky;
    top: 96px;
    background: var(--db-bg);
    border: 1px solid var(--db-border);
    border-radius: var(--db-radius);
    padding: 1.5rem;
}

.db-int-toc__title {
    font-family: var(--db-font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--db-text);
    margin: 0 0 1rem;
}

.db-int-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.db-int-toc__list li {
    margin-bottom: 0.25rem;
}

.db-int-toc__list > li {
    margin-bottom: 0.375rem;
}

.db-int-toc__list a {
    font-size: 0.8125rem;
    color: var(--db-text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
    line-height: 1.5;
    display: block;
    padding: 0.125rem 0;
}

.db-int-toc__list a:hover {
    color: var(--db-blue);
}

.db-int-toc__sublist {
    list-style: none;
    padding: 0.25rem 0 0.25rem 0.875rem;
    margin: 0;
    border-left: 2px solid var(--db-border);
}

.db-int-toc__sublist li {
    margin-bottom: 0.2rem;
}

.db-int-toc__sublist a {
    font-size: 0.75rem;
    color: var(--db-text-muted);
}

.db-int-toc__sublist a:hover {
    color: var(--db-blue);
}

/* ─── Content Body ─── */
.db-int-body__content {
    max-width: 820px;
    min-width: 0;
}

.db-int-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--db-border-light);
}

.db-int-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.db-int-section h2 {
    font-family: var(--db-font-display);
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--db-text);
    margin: 0 0 1rem;
    line-height: 1.25;
    scroll-margin-top: 100px;
}

.db-int-section h3 {
    font-family: var(--db-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--db-text);
    margin: 0 0 0.75rem;
    line-height: 1.3;
    scroll-margin-top: 100px;
}

.db-int-section h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--db-text);
    margin: 0 0 0.625rem;
    scroll-margin-top: 100px;
}

.db-int-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--db-text-secondary);
    margin: 0;
}

/* ─── FAQ ─── */
.db-int-faq {
    padding: 5rem 0;
    background: var(--db-bg-alt);
}

.db-int-faq__title {
    font-family: var(--db-font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--db-text);
    margin: 0 0 3rem;
}

/* ─── CTA ─── */
.db-int-cta {
    position: relative;
    padding: 5rem 0;
    background: var(--db-navy);
    text-align: center;
    overflow: hidden;
}

.db-int-cta__inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
}

.db-int-cta h2 {
    font-family: var(--db-font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.db-int-cta p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #94a3b8;
    margin: 0 0 2.5rem;
}

/* ─── Responsive ─── */
@media (max-width: 1280px) {
    .db-int-layout__grid {
        grid-template-columns: 220px 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 1200px) {
    .db-int-hero {
        padding: 5rem 0 3rem;
        padding-top: calc(5rem + 72px);
    }
}

@media (max-width: 992px) {
    .db-int-layout__grid {
        grid-template-columns: 1fr;
    }

    .db-int-sidebar {
        order: -1;
    }

    .db-int-toc__box {
        position: static;
    }

    .db-int-image__frame {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .db-int-hero {
        padding: 4rem 0 3rem;
        padding-top: calc(4rem + 72px);
    }

    .db-int-hero h1 {
        font-size: 1.875rem;
    }

    .db-int-layout {
        padding: 2.5rem 0 3.5rem;
    }

    .db-int-toc__box {
        padding: 1.25rem;
    }

    .db-int-faq {
        padding: 3.5rem 0;
    }

    .db-int-cta {
        padding: 3.5rem 0;
    }

    .db-int-section {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }

    .db-int-section h2 {
        font-size: 1.375rem;
    }
}

@media (max-width: 480px) {
    .db-int-hero h1 {
        font-size: 1.625rem;
    }

    .db-int-hero__meta {
        gap: 1rem;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .db-int-hero__back {
        transition: none !important;
    }
}
