/* ============================================================
   Trust — "The Vault"
   Steward: S9 Engineering   Page: trust.html
   Sprint 6 signature experience. Additive, scoped IIFE + this
   sheet, deletable unit. Does not touch main.js, theme.js, or
   any other namespace.

   Motion: ratified grammar, cubic-bezier(0.22, 1, 0.36, 1),
   GPU-only (transform/opacity). This turn's directive: the Vault
   should never feel dramatic, it should feel inevitable. Each
   lock resists just enough to prove it was genuinely tested — a
   short, single, non-bouncy strain, then instant, permanent
   stillness. The holding moment matters more than the animation.
   No shimmer, no loop, no idle motion on an untested lock.
   ============================================================ */

/* --- Hero soft cue --- */
.vlt-soft-cue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}

.vlt-soft-cue:hover,
.vlt-soft-cue:focus-visible {
    color: var(--text-primary);
    gap: 9px;
}

.vlt-soft-cue i {
    width: 15px;
    height: 15px;
}

/* --- Standard line --- */
.vlt-standard {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- The room --- */
.vlt-room .container {
    max-width: 780px;
}

.vlt-ledger {
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.vlt-ledger-count {
    color: var(--text-primary);
    font-weight: 700;
}

.vlt-locks {
    border: 1px solid var(--border-hairline, var(--border));
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    overflow: hidden;
}

/* --- One lock --- */
.vlt-lock {
    border-bottom: 1px solid var(--border-hairline, var(--border));
}

.vlt-lock:last-child {
    border-bottom: none;
}

.vlt-press {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.vlt-press:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.vlt-glyph {
    flex-shrink: 0;
    display: flex;
}

.vlt-glyph-svg {
    width: 26px;
    height: 30px;
}

.vlt-glyph-svg .vlt-shackle,
.vlt-glyph-svg .vlt-body {
    stroke: var(--text-muted);
    transition: stroke 0.2s ease;
    transform-box: fill-box;
    transform-origin: center;
}

.vlt-glyph-svg .vlt-keyhole {
    fill: var(--text-muted);
    transition: fill 0.2s ease;
}

.vlt-q-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.vlt-q {
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--text-primary);
}

.vlt-instruction {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.vlt-stamp {
    flex-shrink: 0;
    min-width: 68px;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--success-text);
    border: 1px solid var(--success);
    border-radius: 4px;
    padding: 4px 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* --- Held state: the shackle strains once, then stays still --- */
.vlt-lock.is-testing .vlt-shackle {
    animation: vlt-strain 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes vlt-strain {
    0% { transform: translateY(0) scaleY(1); }
    45% { transform: translateY(1.5px) scaleY(0.94); }
    100% { transform: translateY(0) scaleY(1); }
}

.vlt-lock.is-held .vlt-glyph-svg .vlt-shackle,
.vlt-lock.is-held .vlt-glyph-svg .vlt-body {
    stroke: var(--success);
}

.vlt-lock.is-held .vlt-glyph-svg .vlt-keyhole {
    fill: var(--success);
}

.vlt-lock.is-held .vlt-stamp {
    opacity: 1;
}

/* --- The result (revealed once held) --- */
.vlt-result {
    border-top: 1px solid var(--border-hairline, var(--border));
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.vlt-result.is-open {
    max-height: 300px;
    opacity: 1;
}

.vlt-result-inner {
    padding: 18px 24px 22px 68px;
}

.vlt-statement {
    margin: 0 0 12px;
    color: var(--text-secondary);
    max-width: 56ch;
}

.vlt-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.vlt-docs a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-text, var(--accent));
    text-decoration: underline;
    text-underline-offset: 2px;
}

.vlt-docs a:hover,
.vlt-docs a:focus-visible {
    color: var(--text-primary);
}

/* --- Completion state --- */
.vlt-complete {
    margin-top: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.vlt-complete.is-visible {
    opacity: 1;
}

.vlt-complete p {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* The site-wide fixed .mobile-sticky-cta would otherwise sit on
   top of an open lock's own document links on mobile. vault.js
   hides it (via .vlt-hide-sticky on <body>) while the Vault is in
   view, same pattern as Sprints 3, 4 and 5. */
.vlt-hide-sticky .mobile-sticky-cta {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

@media (max-width: 600px) {
    .vlt-press {
        padding: 16px 18px;
        gap: 14px;
    }

    .vlt-result-inner {
        padding: 16px 18px 20px;
    }

    .vlt-stamp {
        min-width: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vlt-lock.is-testing .vlt-shackle {
        animation: none;
    }

    .vlt-result {
        transition: none;
    }

    .vlt-complete {
        transition: none;
    }
}
