/* ============================================================
   Product Landing Shell — shared by Lua VirtualBox, PyConfuser,
   and JS-Reactor landings. Sits on top of the global style.css
   tokens and reuses .feature-card / .features-grid / .section-title
   / .gradient-separator / .cta / .btn* from the site theme.
   ============================================================ */

/* ---------- Hero ---------- */
.pl-hero {
    position: relative;
    overflow: hidden;
    padding: 104px 0 84px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--primary-accent) 10%, transparent), transparent 32rem),
        var(--background-color);
}

.pl-hero .container {
    max-width: 920px;
}

.pl-eyebrow {
    display: inline-block;
    margin: 0 0 18px;
    padding: 7px 14px;
    border: 1px solid var(--outline-color);
    border-radius: var(--radius-pill);
    color: var(--primary-accent);
    background: color-mix(in srgb, var(--primary-accent) 8%, transparent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pl-hero h1 {
    margin: 0 0 22px;
    color: var(--on-surface-text);
    font-family: var(--font-family);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
}

.pl-hero h1 .pl-accent {
    color: var(--primary-accent);
}

.pl-hero__lead {
    max-width: 680px;
    margin: 0 auto 36px;
    color: var(--secondary-text);
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.7;
}

.pl-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.pl-hero__actions .btn {
    min-width: 200px;
    justify-content: center;
}

/* ---------- Stats strip ---------- */
.pl-stats {
    padding: 40px 0;
    background: var(--surface-color);
    border-top: 1px solid var(--outline-color);
    border-bottom: 1px solid var(--outline-color);
}

.pl-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    text-align: center;
}

.pl-stat__value {
    color: var(--on-surface-text);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.pl-stat__label {
    margin-top: 8px;
    color: var(--secondary-text);
    font-size: 0.92rem;
    font-weight: 500;
}

/* ---------- Section header ---------- */
.pl-section {
    padding: 88px 0;
}

.pl-section--alt {
    background: var(--surface-color);
    border-top: 1px solid var(--outline-color);
    border-bottom: 1px solid var(--outline-color);
}

.pl-section__head {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.pl-section__head h2 {
    margin: 0 0 16px;
    color: var(--on-surface-text);
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.pl-section__head p {
    margin: 0;
    color: var(--secondary-text);
    font-size: 1.08rem;
    line-height: 1.65;
}

/* ---------- Deep-dive (copy + code box) ---------- */
.pl-deepdive__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}

/* Stacked code panels (real input + real output) */
.pl-deepdive__stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pl-deepdive__copy h3 {
    margin: 0 0 18px;
    color: var(--on-surface-text);
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.pl-deepdive__copy p {
    margin: 0 0 18px;
    color: var(--secondary-text);
    font-size: 1.05rem;
    line-height: 1.7;
}

.pl-deepdive__copy p:last-child {
    margin-bottom: 0;
}

.pl-deepdive__copy strong {
    color: var(--on-surface-text);
    font-weight: 600;
}

.pl-code {
    position: relative;
    border: 1px solid var(--outline-color);
    border-radius: var(--radius-md);
    background: #0b0c0f;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

[data-theme="light"] .pl-code {
    background: #0e1116;
}

.pl-code__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.pl-code__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.pl-code__label {
    margin-left: 6px;
    color: rgba(245, 245, 247, 0.5);
    font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.pl-code__tag {
    margin-left: auto;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    background: var(--primary-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pl-code__body {
    margin: 0;
    padding: 20px;
    /* Collapsed by default; JS toggles .is-expanded to remove the cap */
    max-height: 320px;
    overflow: auto;
    color: #e6e6ea;
    font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    tab-size: 4;
    position: relative;
}

/* When collapsed, fade the bottom edge so it reads as "there is more" */
.pl-code:not(.is-expanded) .pl-code__body::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: linear-gradient(180deg, rgba(11, 12, 15, 0), #0b0c0f 92%);
    pointer-events: none;
}

.pl-code.is-expanded .pl-code__body {
    max-height: none;
}

/* Toolbar (Show all / Copy) */
.pl-code__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.pl-code__meta {
    color: rgba(245, 245, 247, 0.45);
    font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    font-size: 0.74rem;
    letter-spacing: 0.02em;
}

.pl-code__actions {
    display: flex;
    gap: 8px;
}

.pl-code__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(245, 245, 247, 0.82);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.pl-code__btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.pl-code__btn:focus-visible {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

.pl-code__btn.is-primary {
    background: var(--primary-accent);
    border-color: transparent;
    color: #fff;
}

.pl-code__btn.is-primary:hover {
    filter: brightness(1.08);
    background: var(--primary-accent);
}

.pl-code__btn svg {
    width: 14px;
    height: 14px;
}

.pl-code__body .tk-com {
    color: #7a7a82;
}

.pl-code__body .tk-kw {
    color: #5fb3ff;
}

.pl-code__body .tk-fn {
    color: #7ee787;
}

.pl-code__body .tk-str {
    color: #f0b874;
}

.pl-code__body .tk-dim {
    color: rgba(230, 230, 234, 0.45);
}

/* ---------- CTA ---------- */
.pl-cta {
    padding: 88px 0;
    text-align: center;
}

.pl-cta__inner {
    max-width: 620px;
    margin: 0 auto;
}

.pl-cta h2 {
    margin: 0 0 18px;
    color: var(--on-surface-text);
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pl-cta p {
    margin: 0 0 36px;
    color: var(--secondary-text);
    font-size: 1.12rem;
    line-height: 1.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .pl-hero {
        padding: 72px 0 60px;
    }

    .pl-section,
    .pl-cta {
        padding: 64px 0;
    }

    .pl-deepdive__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .pl-hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .pl-hero__actions .btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .pl-stats {
        padding: 32px 0;
    }

    .pl-stats__grid {
        gap: 28px;
    }

    .pl-code__body {
        font-size: 11.5px;
        padding: 16px;
    }
}
