/*
 * Shared marketing page component system ("h2-*").
 * Loaded after _astro/about.css, hedy-brand.css, and hedy-pages.css so these
 * component rules win over the legacy Astro base styles.
 */

*,*::before,*::after { box-sizing: border-box; }
.wrap { width: min(100% - 3rem, 1200px); max-width: none; margin-inline: auto; padding: 0; }
@media (max-width: 600px) { .wrap { width: calc(100% - 2rem); } }

/*
 * Page surfaces resolve through these tokens rather than literal colors so the
 * warm ivory light theme and the Midnight Ink dark theme both stay legible.
 * The rest of the palette comes from hedy-brand.css.
 */
:root {
    --h2-card: #fff;
    --h2-card-soft: #faf7f2;
    --h2-code-bg: #f4f0e8;
    --h2-shadow: rgba(15, 14, 38, 0.1);
    --h2-shadow-soft: rgba(15, 14, 38, 0.05);
    --h2-danger: #c53030;
}

@media (prefers-color-scheme: dark) {
    :root {
        --h2-card: #16142a;
        --h2-card-soft: #1c1a32;
        --h2-code-bg: #07060f;
        --h2-shadow: rgba(0, 0, 0, 0.5);
        --h2-shadow-soft: rgba(0, 0, 0, 0.35);
        --h2-danger: #f08a8a;
    }
}

.h2-section { padding: clamp(2.75rem, 7vw, 4.5rem) 0; }
.page-section.h2-section-tight { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.page-section.h2-section-cta { padding: 1rem 0 clamp(3rem, 8vw, 5rem); }
.h2-section-head {
    max-width: 48rem;
    margin: 0 auto clamp(2.25rem, 5vw, 3.5rem);
    text-align: center;
}
.h2-section-head .page-lead { margin: 0.75rem auto 0; }
.h2-section-head-left {
    max-width: 46rem;
    margin: 0 0 clamp(2rem, 5vw, 3rem);
}
.h2-section-head-left .page-lead { margin-top: 0.75rem; }

.h2-hero {
    position: relative;
    background: transparent;
    padding: 3.25rem 0 1.5rem;
    overflow: hidden;
}
.h2-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    gap: 3.5rem;
    align-items: center;
}
.h2-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--hedy-accent-soft, #f6eedc);
    border: 1px solid rgba(198, 161, 91, 0.45);
    color: var(--hedy-accent-strong, #6d5328);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.h2-hero h1 {
    color: var(--text, #0f0e26);
    font-family: var(--ff-display, "Fraunces", "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: clamp(2.1rem, 4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
    max-width: 20ch;
}
.h2-hero p.lead {
    color: var(--text-2, #34495e);
    font-size: 1.1rem;
    line-height: 1.65;
    max-width: 46ch;
    margin: 0 0 2rem;
}
.h2-hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.h2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.h2-btn-primary {
    background: var(--hedy-ink, #0f0e26);
    color: #fff;
    border-color: var(--hedy-ink, #0f0e26);
    box-shadow: 0 10px 26px rgba(15, 14, 38, 0.18);
}
.h2-btn-primary:hover {
    transform: translateY(-1px);
    background: var(--hedy-ink-soft, #1a182e);
    box-shadow: 0 14px 32px rgba(198, 161, 91, 0.35), inset 0 0 0 1px var(--hedy-accent, #c6a15b);
}
.h2-btn-ghost {
    background: var(--h2-card);
    color: var(--text, #0f0e26);
    border-color: var(--border-2, rgba(15, 14, 38, 0.18));
}
.h2-btn-ghost:hover {
    background: var(--hedy-lavender-soft, #efeaf7);
    border-color: var(--hedy-lavender-strong, #b9a8da);
}
.h2-mcp-link {
    color: var(--hedy-teal, #1f5c63);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
}
.h2-mcp-link:hover { color: var(--hedy-teal-strong, #173e47); }

.h2-panel {
    background: var(--h2-card);
    border: 1px solid var(--border, rgba(15, 14, 38, 0.1));
    border-radius: 18px;
    padding: 1.35rem;
    box-shadow: 0 24px 60px var(--h2-shadow);
}
.h2-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}
.h2-panel-title { color: var(--text, #0f0e26); font-weight: 700; font-size: 0.95rem; }
.h2-panel-badge {
    background: var(--hedy-accent, #c6a15b);
    color: var(--hedy-ink, #0f0e26);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}
.h2-panel-row {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.9rem;
    border-radius: 12px;
    background: var(--h2-card-soft);
    border: 1px solid var(--border, rgba(15, 14, 38, 0.08));
    border-left: 4px solid var(--hedy-accent, #c6a15b);
    margin-bottom: 0.7rem;
}
.h2-panel-row:nth-child(2) { border-left-color: var(--hedy-teal, #1f5c63); }
.h2-panel-row:nth-child(3) { border-left-color: var(--hedy-lavender-strong, #b9a8da); }
.h2-panel-row:last-child { border-left-color: var(--hedy-sage, #5f7a5b); margin-bottom: 0; }
.h2-panel-num {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 6px;
    background: var(--h2-card);
    border: 1px solid var(--border-2, rgba(15, 14, 38, 0.12));
    color: var(--text, #0f0e26);
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.h2-panel-text strong { display: block; color: var(--text, #0f0e26); font-size: 0.88rem; margin-bottom: 0.2rem; }
.h2-panel-text span { display: block; color: var(--text-2, #34495e); font-size: 0.8rem; line-height: 1.4; }

@media (max-width: 1050px) {
    .h2-hero-grid { grid-template-columns: 1fr; }
    .h2-panel { max-width: 520px; }
}
@media (max-width: 640px) {
    .h2-hero { padding: 2.25rem 0 1rem; }
    .h2-hero h1 { max-width: none; font-size: clamp(1.9rem, 7vw, 2.4rem); }
}

.h2-proof { background: transparent; padding: 0; }
.h2-proof-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    padding: 1.75rem 0 2.75rem;
    border-top: none;
}
.h2-proof-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--h2-card);
    border: 1px solid var(--border, rgba(15, 14, 38, 0.1));
    color: var(--text-2, #34495e);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 16px var(--h2-shadow-soft);
}

.h2-final-cta {
    background: linear-gradient(135deg, var(--hedy-lavender-soft, #efeaf7), var(--hedy-accent-soft, #f6eedc));
    border: 1px solid var(--hedy-accent, #c6a15b);
    border-radius: 20px;
    padding: 3.25rem 2.5rem;
    text-align: center;
}
.h2-final-cta .h2-eyebrow { margin-bottom: 0.9rem; }
.h2-final-cta h2 {
    color: var(--text, #0f0e26);
    margin: 0 auto 0.85rem;
    max-width: 28ch;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.h2-final-cta p {
    color: var(--text-2, #34495e);
    max-width: 44ch;
    margin: 0 auto 2rem;
    font-size: 1rem;
    line-height: 1.6;
}
.h2-final-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.h2-btn-outline-solid {
    background: var(--h2-card);
    color: var(--text, #0f0e26);
    border: 2px solid var(--border-2, rgba(15, 14, 38, 0.18));
}
.h2-btn-outline-solid:hover {
    background: var(--hedy-lavender-soft, #efeaf7);
    border-color: var(--hedy-lavender-strong, #b9a8da);
}

.h2-mcp-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}
.h2-mcp-copy { display: grid; gap: 1rem; min-width: 0; }
.h2-point-list { display: grid; gap: 0.75rem; margin-top: 0.5rem; }
.h2-point { display: flex; align-items: flex-start; gap: 0.75rem; }
.h2-point-check {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: var(--hedy-teal-soft, #e8f1f2);
    color: var(--hedy-teal, #1f5c63);
}
.h2-point p { margin: 0; font-size: 0.92rem; color: var(--text-2, #34495e); }
.h2-point strong { color: var(--text, #0f0e26); }

.h2-mcp-card {
    background: var(--h2-card);
    border: 1px solid var(--border, rgba(15, 14, 38, 0.1));
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 0;
    box-shadow: 0 16px 40px var(--h2-shadow);
}
.h2-mcp-card .h2-eyebrow { margin-bottom: 0.6rem; }
.h2-mcp-card h3 { color: var(--text, #0f0e26); font-size: 1.15rem; margin: 0 0 0.6rem; }
.h2-mcp-card > p { color: var(--text-2, #34495e); font-size: 0.85rem; margin: 0 0 0.9rem; }
.h2-mcp-card .h2-code-note { color: var(--text-3, #6b7488); font-size: 0.78rem; margin: 0; }
.h2-code-block {
    background: var(--h2-code-bg);
    padding: 1rem;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.78rem;
    color: var(--text, #0f0e26);
    border: 1px solid var(--border, rgba(15, 14, 38, 0.1));
    margin: 0 0 0.9rem;
}
.h2-code-block code {
    background: transparent;
    border: none;
    color: var(--hedy-teal-strong, #173e47);
    padding: 0;
    font-weight: 600;
}

.h2-loop-card {
    background: var(--h2-card);
    color: var(--text, #0f0e26);
    border: 1px solid var(--border-2, rgba(15, 14, 38, 0.12));
    border-radius: var(--r, 14px);
    padding: 1.75rem;
    box-shadow: 0 10px 30px var(--h2-shadow-soft);
}
.h2-loop-card .h2-loop-label {
    color: var(--hedy-accent-strong, #6d5328);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.75rem;
}
.h2-loop-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.85rem;
    font-size: 0.9rem;
    color: var(--text-2, #34495e);
}
.h2-loop-card li { padding-left: 1.5rem; position: relative; }
.h2-loop-card li > span { position: absolute; left: 0; color: var(--hedy-sage, #5f7a5b); }
.h2-loop-card strong { color: var(--text, #0f0e26); }

/* Card surfaces shared by the pillars, platform, solutions, trust, and FAQ sections. */
.h2-card {
    border: 1px solid var(--border, rgba(15, 14, 38, 0.1));
    border-radius: var(--r, 14px);
    background: var(--h2-card);
    padding: 1.5rem;
    box-shadow: 0 10px 26px var(--h2-shadow-soft);
}
.h2-card h3 { color: var(--text, #0f0e26); margin: 0 0 0.4rem; }
.h2-card > p { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--text-2, #34495e); }

.h2-grid-pillars {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}
.h2-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.25rem;
}
.h2-grid-auto-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
}
.h2-grid-auto-narrow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1.25rem;
}

.h2-pillar-num {
    display: block;
    font-family: var(--ff-display, "Fraunces", system-ui, sans-serif);
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}
.h2-pillar-card h3 { font-size: 1.2rem; margin: 0.5rem 0 0.4rem; }
.h2-pillar-kicker {
    display: block;
    margin: 0 0 0.5rem;
    color: var(--text, #0f0e26);
    font-size: 0.85rem;
    font-weight: 700;
}

.h2-feature-card .h2-feature-icon {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    line-height: 1;
}
.h2-feature-card h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }

.h2-fragmented-card {
    background: var(--h2-card);
    border: 1px solid var(--border-2, rgba(15, 14, 38, 0.18));
    border-radius: var(--r, 14px);
    padding: 1.75rem;
    box-shadow: 0 10px 30px var(--h2-shadow-soft);
}
.h2-fragmented-label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--h2-danger);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.h2-fragmented-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.85rem;
    font-size: 0.9rem;
    color: var(--text-2, #34495e);
}
.h2-fragmented-card li { padding-left: 1.5rem; position: relative; }
.h2-fragmented-card li > span { position: absolute; left: 0; color: var(--h2-danger); }

.h2-solution-card h3 { font-size: 1.1rem; margin: 0 0 0.5rem; color: var(--hedy-teal, #1f5c63); }
.h2-solution-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--hedy-teal, #1f5c63);
    font-size: 0.85rem;
    font-weight: 700;
}
.h2-solution-link:hover { color: var(--hedy-teal-strong, #173e47); }

.h2-trust-card { border-radius: var(--r-sm, 10px); padding: 1.25rem; box-shadow: none; }
.h2-trust-card strong { display: block; margin-bottom: 0.35rem; color: var(--text, #0f0e26); }
.h2-trust-card > p { font-size: 0.86rem; }

.h2-faq-wrap { width: min(100% - 3rem, 48rem); }
.h2-faq-list { display: grid; gap: 1.25rem; }
.h2-faq-card h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.h2-faq-card > p { font-size: 0.9rem; }

/*
 * Lifecycle timeline: the connect-to-operate walkthrough. The connector line is
 * drawn on the step marker rather than the row so the last step stops cleanly.
 */
.h2-timeline {
    display: grid;
    gap: 0;
    max-width: 54rem;
    margin: 0 auto;
}
.h2-timeline-step {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 1.1rem;
    padding-bottom: 1.6rem;
}
.h2-timeline-step:last-child { padding-bottom: 0; }
.h2-timeline-marker { position: relative; display: flex; justify-content: center; }
.h2-timeline-marker::after {
    content: "";
    position: absolute;
    top: 2.5rem;
    bottom: -1.6rem;
    width: 2px;
    background: var(--border-2, rgba(15, 14, 38, 0.14));
}
.h2-timeline-step:last-child .h2-timeline-marker::after { display: none; }
.h2-timeline-num {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--h2-card);
    border: 2px solid var(--hedy-accent, #c6a15b);
    color: var(--text, #0f0e26);
    font-weight: 800;
    font-size: 0.85rem;
}
.h2-timeline-phase {
    display: block;
    color: var(--hedy-accent-strong, #6d5328);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}
.h2-timeline-body h3 {
    color: var(--text, #0f0e26);
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
}
.h2-timeline-body p {
    color: var(--text-2, #34495e);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}
.h2-timeline-body code {
    font-size: 0.82rem;
    color: var(--hedy-teal-strong, #173e47);
}

/* Monospace capability/tool name chips used in the MCP tool surface cards. */
.h2-tool-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.h2-tool-list li {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
    background: var(--h2-code-bg);
    border: 1px solid var(--border, rgba(15, 14, 38, 0.1));
    color: var(--hedy-teal-strong, #173e47);
}

.h2-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }

@media (max-width: 1000px) {
    .h2-grid-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .h2-mcp-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
    .h2-faq-wrap { width: calc(100% - 2rem); }
}
@media (max-width: 560px) {
    .h2-grid-pillars { grid-template-columns: 1fr; }
    .h2-final-cta { padding: 2.25rem 1.25rem; }
    .h2-hero-actions .h2-btn,
    .h2-final-actions .h2-btn { width: 100%; }
    .h2-hero-actions .h2-mcp-link { width: 100%; text-align: center; }
}

@media (prefers-color-scheme: dark) {
    /* Mirror the brand's dark primary button: gold fill with ink text. */
    .h2-btn-primary {
        background: var(--hedy-accent, #c6a15b);
        border-color: var(--hedy-accent, #c6a15b);
        color: var(--hedy-ink, #0f0e26);
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    }
    .h2-btn-primary:hover {
        background: var(--hedy-accent-strong, #d8b772);
        border-color: var(--hedy-accent-strong, #d8b772);
        color: var(--hedy-ink, #0f0e26);
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
    }
    .h2-btn-ghost:hover,
    .h2-btn-outline-solid:hover {
        background: var(--h2-card-soft);
        border-color: var(--hedy-lavender-strong, #c3b5e0);
        color: var(--text);
    }
    .h2-panel-badge { color: #0f0e26; }
}
