/* ---------------------------------------------------------------------------
   Showcase page: one chapter per feature (screen recording, facts,
   screenshots), the example PDF report.

   Same tokens as the rest of TraceFind. Everything is `sc-` prefixed because
   this page also carries Webflow, Tailwind and Geist class names.
   --------------------------------------------------------------------------- */

.sc {
    --sc-surface: #0a0a0a;
    --sc-raised: hsla(0, 0%, 100%, 0.024);
    --sc-border: hsla(0, 0%, 100%, 0.12);
    --sc-border-strong: hsla(0, 0%, 100%, 0.22);
    --sc-fg: #ededed;
    --sc-muted: #a1a1a1;
    --sc-faint: #7d7d7d;
    /* TraceFind red; gold stays reserved for purchases. */
    --sc-accent: #cf362d;
    --sc-accent-text: #f0786f;
}

.sc-section {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px 56px;
    box-sizing: border-box;
    text-align: left;
}

.sc-section-head {
    margin: 0 auto 22px;
    text-align: center;
}

.sc-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sc-accent-text);
}

.sc-section-head h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--sc-fg);
}

.sc-section-head p {
    margin: 8px auto 0;
    max-width: 620px;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--sc-muted);
}

/* ============================================================== chapters === */
.sc-intro {
    padding-bottom: 40px;
    text-align: center;
}

.sc-lead {
    max-width: 680px;
    margin: 0 auto 22px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--sc-muted);
}

/* The chapter list stays reachable while scrolling through the chapters. */
.sc-chapters {
    position: sticky;
    top: 72px;
    z-index: 5;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    margin: 0 auto;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    background: rgba(10, 10, 10, 0.86);
    backdrop-filter: blur(8px);
    border: 1px solid var(--sc-border);
    border-radius: 999px;
}

.sc-chapters a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 8px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--sc-muted);
    text-decoration: none;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.sc-chapters a b {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    background: hsla(0, 0%, 100%, 0.08);
    color: var(--sc-fg);
}

.sc-chapters a:hover,
.sc-chapters a[aria-current='true'] {
    background: hsla(0, 0%, 100%, 0.07);
    color: var(--sc-fg);
}

.sc-chapters a[aria-current='true'] b {
    background: var(--sc-accent);
}

.sc-chapter {
    scroll-margin-top: 140px;
}

.sc-demo {
    display: grid;
    gap: 16px;
}

.sc-demo .sc-video video {
    aspect-ratio: 16 / 9;
    height: auto;
}

/* The facts of the run beside what the feature finds. */
.sc-facts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 16px 28px;
    align-items: start;
    padding: 20px;
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 14px;
}

.sc-facts dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.sc-facts dt {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sc-faint);
}

.sc-facts dd {
    margin: 3px 0 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--sc-fg);
    overflow-wrap: anywhere;
}

.sc-facts dd small {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--sc-muted);
}

.sc-facts dd[data-took] {
    color: var(--sc-accent-text);
    font-variant-numeric: tabular-nums;
}

.sc-facts .sc-report-list {
    margin: 0;
}

.sc-facts .sc-btn {
    grid-column: 2;
    justify-self: start;
}

.sc-facts .sc-steps-jump {
    grid-column: 1 / -1;
}

.sc-steps-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.sc-steps-jump span {
    width: 100%;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sc-faint);
}

.sc-steps-jump button {
    padding: 5px 10px;
    border: 1px solid var(--sc-border);
    border-radius: 999px;
    background: transparent;
    color: var(--sc-fg);
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.sc-steps-jump button:hover {
    border-color: var(--sc-accent);
}

.sc-stills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.sc-still {
    display: block;
    overflow: hidden;
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 10px;
    color: var(--sc-muted);
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.sc-still:hover {
    border-color: var(--sc-border-strong);
}

.sc-still img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top;
}

.sc-still span {
    display: block;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.4;
}

/* Enlarged screenshot. */
.sc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.88);
    cursor: zoom-out;
}

.sc-lightbox figure {
    margin: 0;
    max-width: min(1400px, 100%);
}

.sc-lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 110px);
    border-radius: 10px;
    border: 1px solid var(--sc-border);
}

.sc-lightbox figcaption {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--sc-muted);
}

/* ============================================================ PDF report === */
.sc-report {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 14px;
    overflow: hidden;
}

.sc-report-copy {
    padding: 28px;
}

.sc-report-copy h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--sc-fg);
}

.sc-report-copy p {
    margin: 0 0 18px;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--sc-muted);
}

.sc-report-copy code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    color: var(--sc-fg);
}

.sc-report-list {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--sc-muted);
}

.sc-report-list li {
    position: relative;
    margin-bottom: 9px;
    padding-left: 20px;
}

.sc-report-list li::before {
    content: '';
    position: absolute;
    left: 1px;
    top: 0.42em;
    width: 9px;
    height: 5px;
    border-left: 1.5px solid var(--sc-accent);
    border-bottom: 1.5px solid var(--sc-accent);
    transform: rotate(-45deg);
}

.sc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Matches the white "Account" button in the top app bar. */
.sc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    background: var(--sc-fg);
    color: #0a0a0a;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.sc-btn:hover {
    background: #cccccc;
}

.sc-btn svg {
    width: 15px;
    height: 15px;
}

.sc-btn-ghost {
    background: transparent;
    color: var(--sc-fg);
    box-shadow: 0 0 0 1px var(--sc-border);
}

.sc-btn-ghost:hover {
    background: hsla(0, 0%, 100%, 0.06);
    box-shadow: 0 0 0 1px var(--sc-border-strong);
}

.sc-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px #0a0a0a,
        0 0 0 4px hsla(0, 0%, 100%, 0.4);
}

/* The embedded PDF preview pane. */
.sc-report-frame {
    position: relative;
    min-height: 340px;
    border-left: 1px solid var(--sc-border);
    background: #050505;
}

.sc-report-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 340px;
    border: 0;
}

/* Fallback for browsers that refuse to render a PDF inline. Sits underneath
   the iframe, so it is only seen when the iframe paints nothing. */
.sc-report-fallback {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--sc-muted);
    box-sizing: border-box;
}

.sc-report-frame iframe {
    position: relative;
    z-index: 1;
}

/* ============================================================== features === */
.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.sc-card {
    padding: 20px;
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.sc-card:hover {
    border-color: var(--sc-border-strong);
    background: var(--sc-raised);
}

.sc-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 14px;
    border: 1px solid rgba(245, 217, 132, 0.24);
    border-radius: 8px;
    background: rgba(245, 217, 132, 0.08);
    color: var(--sc-accent);
}

.sc-card-icon svg {
    width: 16px;
    height: 16px;
}

.sc-card h3 {
    margin: 0 0 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--sc-fg);
}

.sc-card p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--sc-muted);
}

/* ================================================================= steps === */
.sc-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    counter-reset: sc-step;
}

.sc-step {
    position: relative;
    padding: 20px 20px 20px 56px;
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    counter-increment: sc-step;
}

.sc-step::before {
    content: counter(sc-step);
    position: absolute;
    left: 20px;
    top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--sc-border);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: var(--sc-accent);
}

.sc-step h3 {
    margin: 0 0 5px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--sc-fg);
}

.sc-step p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--sc-muted);
}

/* ================================================================== video == */
.sc-video {
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 14px;
    overflow: hidden;
}

.sc-video video {
    display: block;
    width: 100%;
    max-height: 620px;
    background: #050505;
}

/* ================================================================== CTA ==== */
.sc-cta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 24px 28px;
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 14px;
}

.sc-cta-copy {
    flex: 1 1 260px;
    min-width: 0;
}

.sc-cta-copy strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--sc-fg);
}

.sc-cta-copy span {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--sc-muted);
}

@media (max-width: 820px) {
    .sc-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .sc-facts .sc-btn {
        grid-column: 1;
    }

    /* Screenshots as a swipeable row (like the lookup pages' screenshots),
       not a tall stack: the next one peeks in so it is clear you can swipe. */
    .sc-stills {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 46%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        scrollbar-width: thin;
        scrollbar-color: var(--sc-border-strong) transparent;
    }

    .sc-still {
        scroll-snap-align: start;
    }

    /* The page around these rows sizes itself to its content. A row that
       scrolls sideways must not count towards that size, or it widens the
       whole page: width 0 + min-width 100% = "fill the column, add nothing". */
    .sc-stills,
    .sc-chapters {
        width: 0;
        min-width: 100%;
    }

    .sc-report {
        grid-template-columns: minmax(0, 1fr);
    }

    .sc-report-frame {
        border-left: none;
        border-top: 1px solid var(--sc-border);
        min-height: 420px;
    }
}

@media (max-width: 520px) {
    /* Chapters: one row that scrolls sideways, instead of wrapping into
       2 + 2 + 1 uneven lines. Stays under the header while reading. */
    .sc-chapters {
        top: 64px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        border-radius: 14px;
    }

    .sc-chapters::-webkit-scrollbar {
        display: none;
    }

    .sc-chapters a {
        flex: none;
    }

    .sc-stills {
        grid-auto-columns: 84%;
    }

    .sc-report-copy {
        padding: 22px 18px;
    }

    .sc-actions .sc-btn {
        width: 100%;
    }

    .sc-cta .sc-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sc-chapters a,
    .sc-still,
    .sc-card {
        transition: none;
    }
}
