/* ============================================================
   PrimeForge landing: zero-login sandbox (.pf-sandbox-*)
   Scoped entirely to the sandbox. Reuses landing.css variables.
   ============================================================ */

.pf-sandbox {
    position: relative;
    z-index: 2;
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

.pf-sandbox-kicker {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--teal);
}

.pf-sandbox-title {
    margin: 8px 0 12px;
    font: 800 20px/1.15 Manrope, sans-serif;
    letter-spacing: -.03em;
    color: var(--ink);
}

.pf-sandbox-form {
    display: flex;
    gap: 8px;
}

.pf-sandbox-input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #0a0b0e;
    color: var(--ink);
    font: 500 14px "DM Sans", system-ui, sans-serif;
}

.pf-sandbox-input::placeholder {
    color: #6f7480;
}

.pf-sandbox-input:focus-visible {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 2px rgba(39, 211, 194, .25);
}

.pf-sandbox-submit {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--teal);
    color: #06100f;
    font: 700 13px "DM Sans", system-ui, sans-serif;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease;
}

.pf-sandbox-submit:hover {
    background: #38dfcf;
}

.pf-sandbox-submit:disabled {
    opacity: .6;
    cursor: wait;
}

.pf-sandbox-status {
    min-height: 18px;
    margin: 10px 0 0;
    font-size: 12px;
    color: #9a9faa;
}

.pf-sandbox-status.is-error {
    color: var(--amber);
}

.pf-sandbox-results[hidden] {
    display: none;
}

.pf-sandbox-card {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #2b2f38;
    border-radius: 8px;
    background: #0a0b0e;
}

.pf-sandbox-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #8f94a2;
}

.pf-sandbox-card p {
    margin: 6px 0 0;
    font: 600 15px/1.4 Manrope, sans-serif;
    color: var(--ink);
}

.pf-sandbox-locked-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.pf-sandbox-locked-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid #2b2f38;
    border-radius: 8px;
    background: #0a0b0e;
}

.pf-sandbox-blur {
    margin-top: 10px;
    filter: blur(4px);
    opacity: .7;
    user-select: none;
    pointer-events: none;
}

.pf-sandbox-blur i {
    display: block;
    height: 8px;
    margin-bottom: 9px;
    border-radius: 4px;
    background: #2a2e37;
}

.pf-sandbox-blur i:nth-child(1) { width: 92%; }
.pf-sandbox-blur i:nth-child(2) { width: 78%; }
.pf-sandbox-blur i:nth-child(3) { width: 85%; }
.pf-sandbox-blur i:nth-child(4) { width: 60%; }

.pf-sandbox-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    text-align: center;
    background: rgba(8, 9, 12, .55);
}

.pf-sandbox-lock-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #a0a5af;
}

.pf-sandbox-lock-tag.is-pro {
    color: var(--amber);
}

.pf-sandbox-lock-title {
    font: 700 12px/1.3 Manrope, sans-serif;
    color: #e3e5e9;
}

.pf-sandbox-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 7px;
    background: #f3f4f6;
    color: #0a0b0d;
    font: 700 12px "DM Sans", system-ui, sans-serif;
    text-decoration: none;
    transition: background .2s ease;
}

.pf-sandbox-cta:hover {
    background: #fff;
}

.pf-sandbox-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------------
   Loading state
   Driven entirely by the .is-loading class on #pfSandbox, which
   landingSandbox.js toggles around the fetch. Scoped to
   .pf-sandbox.is-loading so nothing animates at rest.
   ------------------------------------------------------------ */

@keyframes pf-sandbox-shimmer {
    0% {
        background-position: 120% 0;
    }

    100% {
        background-position: -120% 0;
    }
}

@keyframes pf-sandbox-pulse {
    0%,
    100% {
        opacity: .55;
    }

    50% {
        opacity: 1;
    }
}

/* Status line: "Forging your preview..." gently pulses */
.pf-sandbox.is-loading .pf-sandbox-status {
    color: var(--teal);
    animation: pf-sandbox-pulse 1.6s ease-in-out infinite;
}

/* Output cards become shimmering skeleton bars (text is cleared in JS) */
.pf-sandbox.is-loading .pf-sandbox-card p {
    display: block;
    width: 78%;
    min-height: 1.4em;
    color: transparent;
    border-radius: 4px;
    user-select: none;
    background: linear-gradient(
        90deg,
        #1a1d25 0%,
        #2b303b 35%,
        #39404d 50%,
        #2b303b 65%,
        #1a1d25 100%
    );
    background-size: 200% 100%;
    animation: pf-sandbox-shimmer 1.4s linear infinite;
}

.pf-sandbox.is-loading .pf-sandbox-card + .pf-sandbox-card p {
    width: 92%;
}

/* Blurred Pro placeholders breathe slightly, staggered */
.pf-sandbox.is-loading .pf-sandbox-blur i {
    animation: pf-sandbox-pulse 1.6s ease-in-out infinite;
}

.pf-sandbox.is-loading .pf-sandbox-blur i:nth-child(2) { animation-delay: .2s; }
.pf-sandbox.is-loading .pf-sandbox-blur i:nth-child(3) { animation-delay: .4s; }
.pf-sandbox.is-loading .pf-sandbox-blur i:nth-child(4) { animation-delay: .6s; }

/* Submit button: pulsing teal gradient sweep (hover kept on-palette) */
.pf-sandbox.is-loading .pf-sandbox-submit,
.pf-sandbox.is-loading .pf-sandbox-submit:hover {
    background: linear-gradient(
        90deg,
        #1fb8a9 0%,
        #27d3c2 35%,
        #8ff0e6 50%,
        #27d3c2 65%,
        #1fb8a9 100%
    );
    background-size: 200% 100%;
    animation: pf-sandbox-shimmer 1.6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .pf-sandbox.is-loading .pf-sandbox-status,
    .pf-sandbox.is-loading .pf-sandbox-card p,
    .pf-sandbox.is-loading .pf-sandbox-blur i,
    .pf-sandbox.is-loading .pf-sandbox-submit,
    .pf-sandbox.is-loading .pf-sandbox-submit:hover {
        animation: none;
    }
}

@media (max-width: 720px) {
    .pf-sandbox {
        padding: 14px;
    }

    .pf-sandbox-form {
        flex-direction: column;
    }

    .pf-sandbox-submit {
        width: 100%;
    }

    .pf-sandbox-locked-grid {
        grid-template-columns: 1fr;
    }

    .pf-sandbox-locked-card {
        min-height: 130px;
    }
}
