/* Shared styles for the long-form product pages (/snippets/, /tasks/).
   style.css is the hero's stylesheet — it sets `overflow: hidden` on body,
   because index.html and error.html are single-viewport pages that must never
   scroll. These pages do scroll, so they load style.css for the tokens, the
   background glows and the reset, then override what the hero assumed. */

body {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.7;
}

.page {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

/* Back to Bang Labs */
.page__home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #9ca3b0;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 3rem;
    transition: color 0.2s;
}

.page__home:hover { color: #c7d2fe; }

/* Masthead */
.mast {
    margin-bottom: 4rem;
}

.mast__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 52px;
    padding: 0 0.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 1.5rem;
    color: #c7d2fe;
}

.mast__slogan {
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #c7d2fe, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.25rem;
}

.mast__lede {
    font-size: 1.15rem;
    color: #9ca3b0;
    max-width: 34rem;
}

/* Sections */
.section {
    margin-bottom: 3.5rem;
}

.section__kicker {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6366f1;
    margin-bottom: 0.75rem;
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f0f0f5;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #e0e0e8;
    margin-bottom: 0.4rem;
}

.section p {
    color: #c3c3cf;
    margin-bottom: 1rem;
    max-width: 38rem;
}

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

.section a {
    color: #c7d2fe;
    text-decoration: underline;
    text-decoration-color: rgba(99, 102, 241, 0.5);
    text-underline-offset: 3px;
}

.section a:hover { text-decoration-color: #6366f1; }

/* Feature cards */
.cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin-top: 1.5rem;
}

.card {
    background: rgba(18, 18, 28, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
}

.card p {
    font-size: 0.925rem;
    color: #9ca3b0;
    margin: 0;
}

/* A labelled example block — the anatomy of a snippet or a task.
   Deliberately not a screenshot: it is the text convention itself, so it
   cannot drift out of date the way a captured screen does. */
.anatomy {
    background: rgba(10, 10, 18, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #c3c3cf;
    overflow-x: auto;
}

.anatomy__line { white-space: pre-wrap; }

/* The chip row is markup, not preformatted text: inheriting `pre-wrap` from
   the block would render the source file's own indentation as a visible
   indent before the first chip. */
.anatomy__tags {
    white-space: normal;
    margin-top: 0.9rem;
}

.anatomy__gap { height: 0.9rem; }
.anatomy__muted { color: #6b7280; }
.anatomy__tag {
    display: inline-block;
    padding: 0.05rem 0.45rem;
    margin: 0.15rem 0.2rem 0.15rem 0;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.18);
    color: #c7d2fe;
    font-size: 0.8rem;
}
.anatomy__cite { color: #06b6d4; }

/* Steps */
.steps {
    list-style: none;
    counter-reset: step;
    margin-top: 1.5rem;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 2.75rem;
    margin-bottom: 1.5rem;
    color: #c3c3cf;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -0.1rem;
    width: 1.9rem;
    height: 1.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Calls to action */
.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.cta a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.cta a.cta--primary {
    background: #6366f1;
    color: #fff;
}

.cta a.cta--primary:hover { background: #4f46e5; }

.cta a.cta--ghost {
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
}

.cta a.cta--ghost:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.6);
}

/* The sibling-product footer: each page points at the other one. */
.sibling {
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding-top: 2.5rem;
    margin-top: 4rem;
}

.sibling__pair {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e0e0e8;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.sibling__pair span { color: #6366f1; }

.sibling p {
    color: #c3c3cf;
    max-width: 38rem;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
    padding: 0.1rem 0.35rem;
    border-radius: 5px;
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
}

.page__foot {
    margin-top: 3rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.page__foot a { color: #9ca3b0; }

@media (max-width: 640px) {
    .page { padding: 2.5rem 1.25rem 4rem; }
    .mast { margin-bottom: 3rem; }
}
