/*
 * assets/css/pages/explainer.css
 *
 * Shared by the two flagship explainer pages — /platform/assessment and
 * /platform/roadmap. Both are built from the site's existing vocabulary
 * (.section, .section-title, .card, .grid); this file adds only what those
 * pages need and nothing else has: a framed embed of a real portal screen,
 * a numbered phase list, and the sample-PDF panel.
 */

/* --- The embedded real screen -------------------------------------------- */

/* A browser-style frame, so the capture inside reads as "a window into the
   product" rather than as a screenshot pasted on the page. */
.demo-frame {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: var(--white);
}

.demo-frame-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #F4F7FA;
    border-bottom: 1px solid var(--border);
}

.demo-frame-bar .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D8DDE1;
}

.demo-frame-bar .demo-frame-label {
    margin: 0 auto;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-light);
    font-family: var(--font-mono);
}

.demo-frame iframe {
    display: block;
    width: 100%;
    height: 640px;
    border: 0;
    background: var(--white);
}

/* The note under the frame: what the visitor is looking at, said plainly. */
.demo-frame-note {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-light);
    text-align: center;
}

@media (max-width: 768px) {
    .demo-frame iframe {
        height: 480px;
    }
}

/* --- The numbered phase list (roadmap page) ------------------------------- */

.phase-row {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.phase-row+.phase-row {
    margin-top: 1rem;
}

.phase-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--brand-primary);
    font-family: var(--font-mono);
    font-weight: 700;
}

.phase-row h3 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.phase-row p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- The sample-PDF panel (roadmap page) ---------------------------------- */

.pdf-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.75rem 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 130%);
    color: var(--white);
}

.pdf-panel h3 {
    color: var(--white);
    margin-bottom: 0.3rem;
}

.pdf-panel p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 46rem;
}

.pdf-panel .pdf-meta {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    color: var(--brand-accent);
}

@media (max-width: 640px) {
    .pdf-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .pdf-panel .btn {
        width: 100%;
        text-align: center;
    }
}

/* --- The teaser + full-screen reader --------------------------------------- */

/* The sample is offered, not dumped: a short framed preview that opens the
   full report in a reader. The teaser is a <button>, so it works from the
   keyboard for free. */
.demo-teaser {
    display: block;
    width: 100%;
    padding: 0;
    text-align: inherit;
    font: inherit;
    cursor: pointer;
}

.demo-teaser-viewport {
    position: relative;
    display: block;
    height: 420px;
    overflow: hidden;
}

.demo-teaser-viewport iframe {
    height: 900px;
    /* Taller than the viewport on purpose: the visible part is the report's
       own hero and summary, cropped rather than squeezed. */
    pointer-events: none;
}

.demo-teaser-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(255, 255, 255, 0.92) 82%, var(--white) 100%);
}

.demo-teaser-cta {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-md);
    background: var(--brand-primary);
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.demo-teaser:hover .demo-teaser-cta {
    background: var(--brand-dark);
    transform: translateX(-50%) translateY(-2px);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(2, 23, 34, 0.72);
}

.lightbox.open {
    display: flex;
}

.lightbox-shell {
    display: flex;
    flex-direction: column;
    width: min(1080px, 96vw);
    height: 92vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}

.lightbox-shell iframe {
    flex: 1;
    width: 100%;
    border: 0;
}

.lightbox-close {
    margin-left: auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #E5EAEE;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover {
    background: var(--brand-primary);
    color: var(--white);
}

@media (max-width: 640px) {
    .lightbox {
        padding: 0.75rem;
    }

    .lightbox-shell {
        height: 94vh;
    }

    .demo-teaser-viewport {
        height: 340px;
    }
}

/* --- The printed roadmap strip (roadmap page) ------------------------------ */

/* Real pages of the real PDF, laid side by side. The strip scrolls on its own
   axis; each page is a plain <img>, so this works identically on a phone. */
.pdf-strip {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1.25rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 48px), transparent 100%);
}

.pdf-strip a {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pdf-strip a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.pdf-strip img {
    display: block;
    height: 380px;
    width: auto;
}

@media (max-width: 640px) {
    .pdf-strip img {
        height: 300px;
    }
}

/* --- Small shared touches -------------------------------------------------- */

/* "What it covers" cards read as a list of promises; keep them tight. */
.covers-grid .card h3 {
    font-size: 1.02rem;
    margin-bottom: 0.35rem;
}

.covers-grid .card p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.covers-grid .card {
    padding: 1.5rem;
}
