/* ============================================================================
   Nexian Global — Scroll-activated section card
   ----------------------------------------------------------------------------
   Used by Rules, Privacy, Terms, and any other long-form document page.
   Cards start dimmed/desaturated; activate (gold-tinted, full saturation)
   when fully visible in the viewport. Driven by /assets/js/scroll-activate.js.
   ============================================================================ */

.scroll-section {
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(160deg, rgba(14, 12, 8, 0.7) 0%, rgba(10, 8, 5, 0.75) 100%);
    border: 1px solid rgba(var(--gold-rgb), 0.04);
    border-top-color: rgba(var(--gold-rgb), 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02),
                inset 0 2px 8px rgba(0, 0, 0, 0.2);
    filter: saturate(0.3) brightness(0.65);
    opacity: 0;
    transform: translateY(8px);
    transition: background 500ms var(--ease-out),
                border-color 500ms var(--ease-out),
                box-shadow 500ms var(--ease-out),
                filter 500ms var(--ease-out),
                opacity 400ms var(--ease-out),
                transform 400ms var(--ease-out);
}

.scroll-section.in-view {
    opacity: 1;
    transform: translateY(0);
}

.scroll-section.active {
    background: linear-gradient(160deg, rgba(32, 24, 12, 0.92) 0%, rgba(22, 16, 8, 0.95) 100%);
    border-top-color: rgba(var(--gold-rgb), 0.45);
    border-left-color: rgba(var(--gold-rgb), 0.12);
    border-right-color: rgba(var(--gold-rgb), 0.12);
    border-bottom-color: rgba(var(--gold-rgb), 0.12);
    box-shadow: inset 0 1px 0 rgba(var(--gold-rgb), 0.1),
                inset 0 2px 12px rgba(0, 0, 0, 0.3),
                0 4px 20px rgba(0, 0, 0, 0.35);
    filter: none;
}

.scroll-section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 500ms var(--ease-out), border-color 500ms var(--ease-out);
}
.scroll-section.active .scroll-section-header {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(8, 6, 2, 0.35) 100%);
    border-bottom-color: rgba(var(--gold-rgb), 0.15);
}

.scroll-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
    transition: all 500ms var(--ease-out);
}
.scroll-section.active .scroll-section-icon {
    background: rgba(var(--gold-rgb), 0.1);
    border-color: rgba(var(--gold-rgb), 0.22);
    color: rgba(var(--gold-rgb), 0.7);
}

.scroll-section-id {
    padding: 0.225rem 0.6rem;
    border-radius: 0.25rem;
    font-family: var(--font-display);
    font-size: 0.875rem;         /* ≈ 12.6px actual */
    font-weight: 700;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    transition: all 500ms var(--ease-out);
}
.scroll-section.active .scroll-section-id {
    background: rgba(var(--gold-rgb), 0.1);
    color: var(--gold-400);
    border-color: rgba(var(--gold-rgb), 0.3);
}

.scroll-section-title {
    font-family: var(--font-display);
    font-size: 1.0625rem;        /* ≈ 15.3px actual */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(200, 180, 140, 0.85);
    margin: 0;
    transition: color 500ms var(--ease-out);
}
.scroll-section.active .scroll-section-title { color: #C9A84C; }

.scroll-section-trailing {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent);
    transition: background 500ms var(--ease-out);
}
.scroll-section.active .scroll-section-trailing {
    background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.25), transparent);
}

.scroll-section-body { padding: 1rem; }

.scroll-section-intro {
    /* Pre-bullets intro — same size as body for visual consistency. */
    font-size: 1.125rem;
    line-height: 1.65;
    margin-bottom: 0.875rem;
    color: rgba(190, 170, 130, 0.85);
    transition: color 500ms var(--ease-out);
}
.scroll-section.active .scroll-section-intro { color: rgba(190, 170, 130, 0.8); }

.scroll-section-footer {
    font-size: 0.8125rem;
    line-height: 1.6;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    color: rgba(190, 170, 130, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 500ms var(--ease-out);
}
.scroll-section.active .scroll-section-footer {
    color: rgba(190, 170, 130, 0.85);
    border-top-color: rgba(var(--gold-rgb), 0.12);
}

.scroll-section-note {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(212, 175, 55, 0.04);
    border-right: 2px solid rgba(var(--gold-rgb), 0.2);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: rgba(190, 170, 130, 0.85);
    transition: all 500ms var(--ease-out);
}
.scroll-section.active .scroll-section-note {
    background: rgba(212, 175, 55, 0.07);
    border-left-color: rgba(var(--gold-rgb), 0.55);
    color: rgba(190, 170, 130, 0.75);
}

.scroll-section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(var(--gold-rgb), 0.3);
    border-bottom: 1px solid transparent;
    transition: all 300ms var(--ease-out);
}
.scroll-section.active .scroll-section-link {
    color: var(--gold-400);
    border-bottom-color: rgba(var(--gold-rgb), 0.5);
}
.scroll-section-link:hover { color: var(--gold-200) !important; }

.scroll-subsections { display: flex; flex-direction: column; gap: 0.75rem; }

.scroll-subsection {
    border-radius: var(--radius-md);
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-top-color: rgba(255, 255, 255, 0.04);
    transition: all 500ms var(--ease-out);
}
.scroll-section.active .scroll-subsection {
    background: linear-gradient(160deg, rgba(18, 13, 6, 0.6) 0%, rgba(12, 9, 4, 0.7) 100%);
    border-top-color: rgba(var(--gold-rgb), 0.15);
    border-left-color: rgba(var(--gold-rgb), 0.06);
    border-right-color: rgba(var(--gold-rgb), 0.06);
    border-bottom-color: rgba(var(--gold-rgb), 0.06);
}

.scroll-subsection-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.scroll-subsection-id {
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-family: var(--font-display);
    font-size: 0.8125rem;        /* ≈ 11.7px actual */
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    transition: all 500ms var(--ease-out);
}
.scroll-section.active .scroll-subsection-id {
    background: rgba(var(--gold-rgb), 0.07);
    color: rgba(var(--gold-rgb), 0.75);
    border-color: rgba(var(--gold-rgb), 0.22);
}

.scroll-subsection-title {
    font-family: var(--font-display);
    font-size: 1.0625rem;        /* ≈ 15.3px actual */
    font-weight: 600;
    color: rgba(201, 168, 76, 0.85);
    transition: color 500ms var(--ease-out);
}
.scroll-section.active .scroll-subsection-title { color: rgba(201, 168, 76, 0.9); }

.scroll-subsection-text {
    /* Primary rule body. Root font-size is scaled to ~14.4px globally so
       1.125rem ≈ 16.2px actual — comfortable for sustained reading. */
    font-size: 1.125rem;
    line-height: 1.65;
    margin-bottom: 0.5rem;
    color: rgba(190, 170, 130, 0.85);
    transition: color 500ms var(--ease-out);
}
.scroll-subsection-text:last-child { margin-bottom: 0; }
.scroll-section.active .scroll-subsection-text { color: rgba(190, 170, 130, 0.75); }

/* Indented bullet line (a paragraph that starts with '•') */
.scroll-subsection-text.bullet { padding-right: 0.5rem; }

/* ============================================================================
   Premium document container — wraps legal/long-form pages
   ============================================================================ */

.doc-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(160deg, rgba(22, 16, 10, 0.82) 0%, rgba(12, 9, 6, 0.88) 100%);
    border: 1px solid rgba(var(--gold-rgb), 0.2);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(var(--gold-rgb), 0.1);
}

.doc-container > .top-shimmer {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 0%, var(--gold-400) 20%, #FFF8DC 50%, var(--gold-400) 80%, transparent 100%);
    box-shadow: 0 0 24px rgba(var(--gold-rgb), 0.7);
}

.doc-header {
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
}

.doc-eyebrow {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: rgba(var(--gold-rgb), 0.6);
    margin-bottom: 0.5rem;
}

.doc-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #E8D9B0;
    text-shadow: 0 2px 16px rgba(var(--gold-rgb), 0.3);
    margin-bottom: 0.5rem;
}
@media (min-width: 768px) {
    .doc-title { font-size: 1.875rem; }
}

.doc-subtitle {
    font-size: 0.8125rem;
    color: rgba(154, 130, 85, 0.85);
}

.doc-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
}
.doc-divider .line { flex: 1; height: 1px; }
.doc-divider .line.left  { background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.25)); }
.doc-divider .line.right { background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.25), transparent); }
.doc-divider .glyph { color: rgba(var(--gold-rgb), 0.4); flex-shrink: 0; }

.doc-intro {
    margin: 0 1.5rem 2rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(32, 24, 12, 0.6) 0%, rgba(22, 16, 8, 0.7) 100%);
    border: 1px solid rgba(var(--gold-rgb), 0.1);
    border-right: 4px solid rgba(var(--gold-rgb), 0.6);
    box-shadow: inset 0 1px 0 rgba(var(--gold-rgb), 0.06), 0 4px 16px rgba(0, 0, 0, 0.2);
    font-size: 0.8125rem;
    line-height: 1.7;
    color: rgba(190, 170, 130, 0.8);
}

.doc-body {
    padding: 0 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.doc-corner {
    position: absolute;
    width: 1.5rem;
    height: 1.5rem;
    border-color: rgba(var(--gold-rgb), 0.35);
    pointer-events: none;
}
.doc-corner.tl { top: 0.75rem;    right: 0.75rem;  border-top: 1px solid; border-right: 1px solid; border-top-right-radius: 0.25rem; }
.doc-corner.tr { top: 0.75rem;    left: 0.75rem; border-top: 1px solid; border-left: 1px solid; border-top-left-radius: 0.25rem; }
.doc-corner.bl { bottom: 0.75rem; right: 0.75rem;  border-bottom: 1px solid; border-right: 1px solid; border-bottom-right-radius: 0.25rem; }
.doc-corner.br { bottom: 0.75rem; left: 0.75rem; border-bottom: 1px solid; border-left: 1px solid; border-bottom-left-radius: 0.25rem; }
