/* ─────────────────────────────────────────────────────────────────
   Marketing pieces — hero, composition diagram, gradient backdrops,
   capability grid, plugin cards, demo strip, etc.
   ───────────────────────────────────────────────────────────────── */

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(96px, 14vh, 160px) clamp(64px, 10vw, 120px);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    pointer-events: none;
    z-index: 0;
}
.hero::after {
    /* Subtle grid mesh */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 800px 500px at 50% 30%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 800px 500px at 50% 30%, black 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
.hero__eyebrow { margin-bottom: var(--s-4); }
.hero__title {
    font-size: var(--fz-5xl);
    font-weight: 800;
    letter-spacing: var(--tracking-tight);
    line-height: 1.05;
    margin-bottom: var(--s-5);
    max-width: 22ch;
    text-wrap: balance;
}
.hero__title .accent {
    background: var(--gradient-pop);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero__subtitle {
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    color: var(--text-secondary);
    line-height: var(--lh-loose);
    max-width: 60ch;
    margin-bottom: var(--s-6);
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    align-items: center;
}
.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-5);
    margin-top: var(--s-7);
    color: var(--text-muted);
    font-size: var(--fz-xs);
}
.hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hero__meta-item svg { width: 14px; height: 14px; color: var(--success); }

.hero--split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--s-7);
    align-items: center;
}
@media (max-width: 960px) {
    .hero--split { grid-template-columns: 1fr; }
}

.hero__visual {
    position: relative;
}
.hero__visual-card {
    border-radius: var(--r-xl);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: perspective(1200px) rotateX(2deg) rotateY(-4deg);
    transition: transform var(--t-slow);
}
.hero__visual-card:hover { transform: perspective(1200px) rotateX(0deg) rotateY(0deg); }

/* ── Trust strip ───────────────────────────────────────────────── */
.trust-strip {
    padding-block: var(--s-7);
    border-block: 1px solid var(--border-subtle);
    background: var(--bg-canvas);
}
.trust-strip__label {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--fz-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-extra);
    margin-bottom: var(--s-5);
}
.trust-strip__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 4vw, 64px);
    color: var(--text-muted);
}
.trust-strip__row .chip {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-secondary);
}

/* ── Composition story (Flow → Pipeline → Chain) ──────────────── */
.composition {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-5);
    position: relative;
}
@media (max-width: 960px) {
    .composition { grid-template-columns: 1fr; }
}
.comp-tier {
    position: relative;
    padding: var(--s-6);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: transform var(--t-base), border-color var(--t-base);
}
.comp-tier::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-pop);
    opacity: 0.5;
    transition: opacity var(--t-base);
}
.comp-tier:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
}
.comp-tier:hover::after { opacity: 1; }
.comp-tier__num {
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    color: var(--text-muted);
    letter-spacing: var(--tracking-extra);
    text-transform: uppercase;
}
.comp-tier__title {
    font-size: var(--fz-xl);
    font-weight: 700;
    margin-block: var(--s-2) var(--s-3);
    color: var(--text-strong);
}
.comp-tier__desc {
    color: var(--text-secondary);
    font-size: var(--fz-sm);
    margin-bottom: var(--s-4);
    line-height: var(--lh-loose);
}
.comp-tier .code {
    background: var(--bg-inset);
    border-color: var(--border-subtle);
    font-size: 0.82rem;
}
.comp-tier .code pre { padding: var(--s-3); }

.comp-arrow {
    display: none;
}
@media (min-width: 961px) {
    .comp-arrow {
        display: grid;
        place-items: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        border-radius: var(--r-pill);
        background: var(--bg-card);
        border: 1px solid var(--border-light);
        color: var(--brand-primary-soft);
        z-index: 2;
    }
    .comp-arrow svg { width: 16px; height: 16px; }
    .comp-arrow--1 { left: calc(33.33% - 16px); }
    .comp-arrow--2 { left: calc(66.66% - 16px); }
}

/* ── Capability grid ───────────────────────────────────────────── */
.capability-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-4);
}
@media (max-width: 1100px) { .capability-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .capability-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .capability-grid { grid-template-columns: 1fr; } }

/* ── Plugin gallery cards ─────────────────────────────────────── */
.plugin-card {
    display: flex;
    flex-direction: column;
    padding: var(--s-6);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
    height: 100%;
}
.plugin-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}
.plugin-card__head {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    margin-bottom: var(--s-3);
}
.plugin-card__mark {
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    background: var(--sig-pass-soft);
    color: var(--brand-primary-soft);
    flex: none;
}
.plugin-card__mark svg { width: 22px; height: 22px; }
[data-theme="light"] .plugin-card__mark { background: var(--sig-pass-soft); color: var(--brand-primary); }
.plugin-card__title {
    font-size: var(--fz-lg);
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: var(--tracking-tight);
}
.plugin-card__category {
    font-size: var(--fz-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-top: 2px;
}
.plugin-card__body {
    color: var(--text-secondary);
    font-size: var(--fz-sm);
    line-height: var(--lh-loose);
    margin-bottom: var(--s-4);
}
.plugin-card__caps {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--s-4);
    display: grid;
    gap: 6px;
    font-size: var(--fz-sm);
    color: var(--text-secondary);
}
.plugin-card__caps li {
    display: flex; gap: 8px; align-items: flex-start; margin: 0;
}
.plugin-card__caps li svg {
    width: 16px; height: 16px;
    color: var(--success);
    margin-top: 3px;
    flex: none;
}
.plugin-card__usecases {
    margin-top: auto;
    padding-top: var(--s-4);
    border-top: 1px solid var(--border-subtle);
    display: grid;
    gap: var(--s-2);
}
.plugin-card__usecase {
    font-size: var(--fz-xs);
    color: var(--text-muted);
    font-style: italic;
}
.plugin-card__usecase::before {
    content: "“";
    color: var(--brand-primary-soft);
    font-style: normal;
    margin-right: 2px;
}
.plugin-card__usecase::after {
    content: "”";
    color: var(--brand-primary-soft);
    font-style: normal;
    margin-left: 2px;
}

/* ── Architecture diagram ──────────────────────────────────────── */
.arch {
    padding: var(--s-7);
    border-radius: var(--r-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}
.arch__row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: var(--s-3);
    align-items: stretch;
}
@media (max-width: 880px) {
    .arch__row { grid-template-columns: 1fr; }
    .arch__arrow { transform: rotate(90deg); justify-self: center; }
}
.arch__node {
    background: var(--bg-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: var(--s-4);
    text-align: center;
}
.arch__node--accent {
    background: var(--bg-elevated);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}
.arch__node h4 { margin: 0 0 6px; font-size: var(--fz-md); }
.arch__node small { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.78rem; }
.arch__arrow {
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: var(--fz-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    padding-inline: 6px;
}
.arch__arrow svg { width: 32px; height: 12px; color: var(--brand-primary-soft); }

/* ── Demo strip ────────────────────────────────────────────────── */
.demo-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-4);
}
@media (max-width: 1000px) { .demo-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .demo-strip { grid-template-columns: 1fr; } }

/* Play badge sits ABOVE the label in flow. It used to be absolutely
   centred on top of the centred text, so the two overlapped and the
   title was unreadable. */
.demo-tile {
    aspect-ratio: 16 / 10;
    border-radius: var(--r-lg);
    background:
        linear-gradient(135deg, var(--sig-pass-soft) 0%, var(--info-soft) 100%),
        var(--bg-card);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-3);
    color: var(--text-muted);
    text-align: center;
    padding: var(--s-4);
    position: relative;
    overflow: hidden;
    transition: border-color var(--t-base), transform var(--t-base);
}
.demo-tile:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.demo-tile__title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--fz-sm);
}
.demo-tile__hint {
    font-size: var(--fz-xs);
    color: var(--text-muted);
    margin-top: 6px;
}
.demo-tile::before {
    content: "▶";
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-overlay);
    border: 1px solid var(--border-light);
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    font-size: 14px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: color var(--t-base), border-color var(--t-base);
}
.demo-tile:hover::before { color: var(--brand-primary); border-color: var(--border-accent); }

/* ── Persona / use-case tile ───────────────────────────────────── */
.persona {
    padding: var(--s-6);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    height: 100%;
    transition: transform var(--t-base), border-color var(--t-base);
}
.persona:hover { transform: translateY(-2px); border-color: var(--border-accent); }
.persona__role {
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    color: var(--brand-primary-soft);
    letter-spacing: var(--tracking-extra);
    text-transform: uppercase;
}
.persona__quote {
    font-family: var(--font-display);
    font-size: var(--fz-lg);
    line-height: var(--lh-snug);
    color: var(--text-strong);
    font-style: italic;
}
.persona__detail {
    color: var(--text-secondary);
    font-size: var(--fz-sm);
    line-height: var(--lh-loose);
}

/* ── Step list (numbered) ──────────────────────────────────────── */
.steps {
    display: grid;
    gap: var(--s-4);
}
.step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: var(--s-4);
    padding: var(--s-5);
    border-radius: var(--r-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
}
.step__num {
    width: 40px;
    height: 40px;
    border-radius: var(--r-pill);
    background: var(--gradient-pop);
    color: var(--text-on-brand);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-family: var(--font-mono);
}
.step h4 { margin: 0 0 4px; font-size: var(--fz-md); }
.step p { color: var(--text-secondary); font-size: var(--fz-sm); margin: 0; }

/* ── KPI / stats panel ─────────────────────────────────────────── */
.stats-panel {
    padding: var(--s-7);
    border-radius: var(--r-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
}
.stats-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    pointer-events: none;
}
.stats-panel__grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--s-5);
}
@media (max-width: 880px) { .stats-panel__grid { grid-template-columns: repeat(2, 1fr); } }
.stats-panel__cell {
    text-align: center;
}
.stats-panel__num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    background: var(--gradient-pop);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stats-panel__label {
    margin-top: var(--s-2);
    color: var(--text-secondary);
    font-size: var(--fz-sm);
}

/* ── YAML cycle (read-only animated panel) ─────────────────────── */
.yaml-cycle {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: var(--bg-inset);
    box-shadow: var(--shadow-md);
}
.yaml-cycle__head {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: 10px var(--s-4);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
}
.yaml-cycle__tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.yaml-cycle__tab {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: var(--fz-xs);
    font-family: var(--font-mono);
    cursor: pointer;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.yaml-cycle__tab.is-active {
    color: var(--text-strong);
    border-color: var(--border-accent);
    background: var(--sig-pass-soft);
}
.yaml-cycle__progress {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    color: var(--text-muted);
}
.yaml-cycle__body {
    position: relative;
    min-height: 280px;
}
.yaml-cycle__panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
    pointer-events: none;
    padding: var(--s-4);
    overflow: auto;
}
.yaml-cycle__panel.is-active {
    opacity: 1;
    pointer-events: auto;
}
.yaml-cycle__panel pre {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-primary);
}

/* ── Page-hero (sub-pages) ─────────────────────────────────────── */
/* Inner-page heroes carry the same measurement grid as the device
   stage, so every page reads as one instrument rather than as a
   landing page plus a docs theme. */
.page-hero {
    position: relative;
    padding-block: clamp(80px, 10vh, 120px) clamp(40px, 6vw, 72px);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--gradient-section-fade);
    overflow: hidden;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 70% 90% at 20% 30%, #000 10%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 90% at 20% 30%, #000 10%, transparent 75%);
    pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero__title {
    font-size: var(--fz-4xl);
    margin-bottom: var(--s-3);
    text-wrap: balance;
}
.page-hero__lead {
    font-size: var(--fz-md);
    color: var(--text-secondary);
    max-width: 60ch;
}

/* ── Feature row (sub-page section) ────────────────────────────── */
.feature-row {
    padding-block: clamp(48px, 6vw, 80px);
    border-top: 1px solid var(--border-subtle);
}
.feature-row__layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--s-7);
    align-items: start;
}
.feature-row.is-flipped .feature-row__layout {
    grid-template-columns: 1.1fr 1fr;
    direction: rtl;
}
.feature-row.is-flipped .feature-row__layout > * { direction: ltr; }
@media (max-width: 880px) {
    .feature-row__layout, .feature-row.is-flipped .feature-row__layout {
        grid-template-columns: 1fr;
        direction: ltr;
    }
}
.feature-row h3 { font-size: var(--fz-2xl); margin-bottom: var(--s-3); }
.feature-row .lead { margin-bottom: var(--s-4); }
.feature-row__bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--s-2);
}
.feature-row__bullets li {
    display: flex; gap: 10px; align-items: flex-start;
    color: var(--text-secondary); font-size: var(--fz-sm); line-height: var(--lh-loose); margin: 0;
}
.feature-row__bullets li svg { width: 18px; height: 18px; color: var(--brand-primary-soft); flex: none; margin-top: 4px; }

/* ── Mock screen panel (placeholder for screenshots) ───────────── */
.mock-screen {
    border-radius: var(--r-lg);
    border: 1px solid var(--border-light);
    background:
        linear-gradient(135deg, var(--sig-pass-soft) 0%, var(--info-soft) 100%),
        var(--bg-card);
    aspect-ratio: 16 / 10;
    box-shadow: var(--shadow-md);
    display: grid;
    place-items: center;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    overflow: hidden;
    position: relative;
}
.mock-screen::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: calc(var(--r-lg) - 4px);
    background:
        repeating-linear-gradient(
            180deg,
            transparent 0 32px,
            rgba(255, 255, 255, 0.04) 32px 33px
        );
    pointer-events: none;
}

/* ── CTA banner ────────────────────────────────────────────────── */
.cta-banner {
    padding: var(--s-8);
    border-radius: var(--r-2xl);
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, var(--sig-pass-soft) 0%, transparent 60%),
        var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}
.cta-banner h2 { font-size: var(--fz-3xl); margin-bottom: var(--s-3); text-wrap: balance; }
.cta-banner p { color: var(--text-secondary); max-width: 56ch; margin: 0 auto var(--s-5); }
