/* =================================================================
   VISEON — Article Pages: Hero + Typography
   Loaded on: is_single() and body.viseon-articles-child-page
   ================================================================= */

/* -----------------------------------------------------------------
   LOCAL TOKENS
   ----------------------------------------------------------------- */
body.single-post,
body.viseon-articles-child-page {
    --article-ink:       #1f2735;
    --article-ink-soft:  #2f3a4b;
    --article-ink-muted: #6b7280;
    --article-surface:   #ffffff;
    --article-border:    rgba(31, 39, 53, 0.08);
    --article-orange:    #f4711d;
}

/* =================================================================
   ARTICLE HERO — page template (1747)
   viseon-article-hero-shell has bg=article-hero-dark via block attr.
   ================================================================= */

/* --- Eyebrow pill ------------------------------------------------ */
body.viseon-articles-child-page .viseon-article-eyebrow-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--article-orange);
    background: rgba(244, 113, 29, 0.12);
    border: 1px solid rgba(244, 113, 29, 0.28);
    border-radius: 999px;
    padding: 5px 14px;
    margin: 0 0 28px 0;
}

/* --- Post title (h1) -------------------------------------------- */
/* Color and font-size come from block attributes (textColor:white, fontSize:display).
   Only typographic refinements here that aren't expressible as block attrs. */
body.viseon-articles-child-page .viseon-article-hero-shell .wp-block-post-title {
    font-weight: 800 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.03em !important;
    margin: 0 !important;
    text-align: left;
}

/* Orange accent on hover link inside title */
body.viseon-articles-child-page .viseon-article-hero-shell .wp-block-post-title a {
    color: inherit;
    text-decoration: none;
}

/* --- Meta row ---------------------------------------------------- */
body.viseon-articles-child-page .viseon-article-hero-meta-row {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
}

body.viseon-articles-child-page .viseon-article-hero-meta-date {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

body.viseon-articles-child-page .viseon-article-hero-meta-terms {
    font-size: 0.875rem;
    margin: 0;
}

body.viseon-articles-child-page .viseon-article-hero-meta-terms a {
    color: var(--article-orange) !important;
    text-decoration: none;
    font-weight: 500;
}

/* Prevent ::before pseudo on hero shell from neve-fse */
body.viseon-articles-child-page .viseon-article-hero-shell::before,
body.viseon-articles-child-page .viseon-article-hero-shell::after {
    display: none;
    content: none;
}

/* =================================================================
   DARK HERO — single posts (is_single(), uses single template 1812)
   ================================================================= */
body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:first-child {
    background: #070a14;
    margin-top: 0;
    margin-bottom: 0;
    padding: 120px 24px 88px;
    border: none;
    position: relative;
}

body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:first-child::before,
body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:first-child::after {
    display: none;
    content: none;
}

body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:first-child h1.wp-block-post-title {
    color: #ffffff !important;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-align: left;
    margin: 0 0 20px 0;
}

/* --- Eyebrow row (category label + date above title) ------------- */
body.single-post .viseon-article-eyebrow-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--article-orange);
}

body.single-post .viseon-article-eyebrow-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

/* --- Meta row (date · source · terms below title) ---------------- */
body.single-post .viseon-article-hero-meta-row {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
}

body.single-post .viseon-article-hero-meta-date,
body.single-post .viseon-article-hero-meta-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

body.single-post .viseon-article-hero-meta-terms {
    font-size: 0.875rem;
    margin: 0;
}

body.single-post .viseon-article-hero-meta-terms a {
    color: var(--article-orange) !important;
    text-decoration: none;
    font-weight: 500;
}

/* --- Content area — single posts --------------------------------- */
body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:nth-child(2) {
    background: var(--article-surface);
    margin-top: 0;
    margin-bottom: 0;
    padding: 72px 24px 96px;
    border: none;
}

body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:nth-child(2)::before,
body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:nth-child(2)::after {
    display: none;
    content: none;
}

/* =================================================================
   ARTICLE CONTENT TYPOGRAPHY
   Applies to both .entry-content and .wp-block-post-content so it
   covers article child pages (template 1747) and single posts.
   ================================================================= */

/* Content max-width */
body.viseon-articles-child-page .wp-block-post-content,
body.single-post .wp-block-post-content {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

/* Body paragraphs */
body.single-post .entry-content p,
body.single-post .wp-block-post-content p,
body.viseon-articles-child-page .entry-content p,
body.viseon-articles-child-page .wp-block-post-content p {
    color: var(--article-ink-soft);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.4rem;
}

/* H2 — section heading */
body.single-post .entry-content h2.wp-block-heading,
body.single-post .wp-block-post-content h2.wp-block-heading,
body.viseon-articles-child-page .entry-content h2.wp-block-heading,
body.viseon-articles-child-page .wp-block-post-content h2.wp-block-heading {
    color: var(--article-ink) !important;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem) !important;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    letter-spacing: -0.02em;
    margin-top: 3.2rem !important;
    margin-bottom: 1rem !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    text-align: left !important;
}

/* H3 — sub-section */
body.single-post .entry-content h3.wp-block-heading,
body.single-post .wp-block-post-content h3.wp-block-heading,
body.viseon-articles-child-page .entry-content h3.wp-block-heading,
body.viseon-articles-child-page .wp-block-post-content h3.wp-block-heading {
    color: #253044 !important;
    font-size: clamp(1.1rem, 1.8vw, 1.35rem) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em;
    margin-top: 2.4rem !important;
    margin-bottom: 0.75rem !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    text-align: left !important;
}

/* H4 */
body.single-post .entry-content h4.wp-block-heading,
body.single-post .wp-block-post-content h4.wp-block-heading,
body.viseon-articles-child-page .entry-content h4.wp-block-heading,
body.viseon-articles-child-page .wp-block-post-content h4.wp-block-heading {
    color: var(--article-ink-soft) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.35;
    margin-top: 2rem !important;
    margin-bottom: 0.65rem !important;
}

/* First element — no top margin */
body.single-post .entry-content > *:first-child,
body.single-post .wp-block-post-content > *:first-child,
body.viseon-articles-child-page .entry-content > *:first-child,
body.viseon-articles-child-page .wp-block-post-content > *:first-child {
    margin-top: 0;
}

/* Lede / intro paragraph (has-large-font-size) */
body.single-post .wp-block-post-content p.has-large-font-size,
body.viseon-articles-child-page .wp-block-post-content p.has-large-font-size {
    font-size: clamp(1.1rem, 2vw, 1.22rem);
    color: var(--article-ink-soft);
    line-height: 1.72;
    margin-bottom: 2rem;
}

/* Links */
body.single-post .wp-block-post-content a:not(.wp-block-button__link),
body.viseon-articles-child-page .wp-block-post-content a:not(.wp-block-button__link) {
    color: var(--article-orange);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s ease;
}

body.single-post .wp-block-post-content a:not(.wp-block-button__link):hover,
body.viseon-articles-child-page .wp-block-post-content a:not(.wp-block-button__link):hover {
    color: #e55a0d;
}

/* Lists */
body.single-post .wp-block-list,
body.viseon-articles-child-page .wp-block-list {
    color: var(--article-ink-soft);
    font-size: 1.05rem;
    line-height: 1.75;
    padding-left: 1.6rem;
    margin-bottom: 1.4rem;
}

body.single-post .wp-block-list li,
body.viseon-articles-child-page .wp-block-list li {
    margin-bottom: 0.45rem;
}

body.single-post .wp-block-list li::marker,
body.viseon-articles-child-page .wp-block-list li::marker {
    color: var(--article-orange);
}

/* Blockquote */
body.single-post .wp-block-quote,
body.viseon-articles-child-page .wp-block-quote {
    border-left: 3px solid var(--article-orange);
    padding: 18px 24px;
    margin: 2.4rem 0;
    background: rgba(244, 113, 29, 0.04);
    border-radius: 0 8px 8px 0;
}

body.single-post .wp-block-quote p,
body.viseon-articles-child-page .wp-block-quote p {
    color: var(--article-ink);
    font-size: 1.08rem;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 0;
}

body.single-post .wp-block-quote cite,
body.viseon-articles-child-page .wp-block-quote cite {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--article-ink-muted);
    font-style: normal;
    font-weight: 600;
}

/* Separator */
body.single-post .wp-block-separator,
body.viseon-articles-child-page .wp-block-separator {
    border-color: var(--article-border);
    margin: 3rem auto;
    max-width: 160px;
    border-top-width: 2px;
}

/* Code */
body.single-post .entry-content code,
body.viseon-articles-child-page .entry-content code,
body.single-post .wp-block-post-content code,
body.viseon-articles-child-page .wp-block-post-content code {
    background: rgba(31, 39, 53, 0.06);
    border: 1px solid var(--article-border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.88em;
    color: var(--article-ink);
}

body.single-post .wp-block-code,
body.viseon-articles-child-page .wp-block-code {
    background: #1a2035;
    border-radius: 8px;
    padding: 24px 28px;
    margin: 2rem 0;
    overflow-x: auto;
}

body.single-post .wp-block-code code,
body.viseon-articles-child-page .wp-block-code code {
    background: none;
    border: none;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Force left-align on centre-aligned blocks in article context */
body.viseon-articles-child-page .wp-block-post-content .has-text-align-center:not(figure):not(.wp-block-separator) {
    text-align: left !important;
}

body.viseon-articles-child-page .wp-block-post-content h2.wp-block-heading,
body.viseon-articles-child-page .wp-block-post-content h3.wp-block-heading {
    text-align: left !important;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 781px) {
    body.viseon-articles-child-page .viseon-article-hero-shell .wp-block-post-title {
        font-size: clamp(2rem, 8vw, 2.8rem) !important;
    }

    body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:first-child {
        padding: 72px 16px 56px;
    }

    body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:first-child h1.wp-block-post-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    body.single-post main.wp-block-group > .wp-block-group.alignfull.is-layout-constrained:nth-child(2) {
        padding: 48px 16px 64px;
    }

    body.single-post .wp-block-post-content,
    body.viseon-articles-child-page .wp-block-post-content {
        max-width: 100%;
    }

    body.single-post .wp-block-post-content p,
    body.viseon-articles-child-page .wp-block-post-content p,
    body.single-post .wp-block-list,
    body.viseon-articles-child-page .wp-block-list {
        font-size: 1rem;
    }
}
