/* ==========================================================================
   CRM Booster — Neo-Brutalist Ghost Theme
   A neo-brutalist design system for SaaS/CRM blogs built on Ghost CMS.
   ========================================================================== */


/* ==========================================================================
   1. CSS Variables
   ========================================================================== */

:root {
    /* ---- Colors ---- */
    --color-white: #FFFFFF;
    --color-off-white: #F7F6F3;
    --color-light-gray: #EBEBEB;
    --color-mid-gray: #999999;
    --color-dark-gray: #3D3D3D;
    --color-near-black: #1A1A1A;
    --color-black: #000000;
    --color-primary: #2563EB;
    --color-primary-light: #DBEAFE;
    --color-accent: #FACC15;
    --color-accent-dark: #CA8A04;
    --color-coral: #FF6B35;
    --color-success: #22C55E;

    /* ---- Semantic colors (dark-mode swappable) ---- */
    --color-bg: var(--color-white);
    --color-surface: var(--color-white);
    --color-surface-alt: var(--color-off-white);
    --color-text: var(--color-near-black);
    --color-text-secondary: var(--color-dark-gray);
    --color-text-muted: var(--color-mid-gray);
    --color-border: var(--color-black);
    --color-shadow: var(--color-black);
    --color-card-bg: var(--color-white);
    --color-code-bg: var(--color-near-black);
    --color-code-text: var(--color-white);

    /* ---- Fonts ---- */
    --font-display: "Syne", sans-serif;
    --font-body: "Outfit", sans-serif;
    --font-mono: "Space Mono", monospace;

    /* ---- Neo-brutal tokens ---- */
    --border-w: 3px;
    --border: var(--border-w) solid var(--color-border);
    --shadow-x: 5px;
    --shadow-y: 5px;
    --shadow-color: var(--color-shadow);
    --shadow: var(--shadow-x) var(--shadow-y) 0 var(--shadow-color);

    /* ---- Spacing scale ---- */
    --space-2: 0.2rem;
    --space-4: 0.4rem;
    --space-8: 0.8rem;
    --space-12: 1.2rem;
    --space-16: 1.6rem;
    --space-20: 2.0rem;
    --space-24: 2.4rem;
    --space-32: 3.2rem;
    --space-40: 4.0rem;
    --space-48: 4.8rem;
    --space-64: 6.4rem;
    --space-80: 8.0rem;
    --space-96: 9.6rem;
    --space-128: 12.8rem;

    /* ---- Layout ---- */
    --max-width: 1280px;
    --outer-padding: max(4vmin, 24px);
    --nav-height: 72px;

    /* ---- Transitions ---- */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* ---- Radius ---- */
    --radius-none: 0;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-full: 9999px;

    /* ---- Z-index layers ---- */
    --z-header: 3000;
    --z-mobile-menu: 4000;
    --z-overlay: 5000;
}


/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 10px;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    tab-size: 4;
}

body {
    font-family: var(--font-body);
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    line-height: 1.15;
    font-weight: 700;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

::selection {
    background-color: var(--color-accent);
    color: var(--color-black);
}

hr {
    border: none;
}

blockquote {
    margin: 0;
}

figure {
    margin: 0;
}

address {
    font-style: normal;
}

iframe {
    border: 0;
}


/* ==========================================================================
   3. Typography
   ========================================================================== */

h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3.2rem, 5vw + 1rem, 5.6rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 3vw + 0.5rem, 3.6rem);
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--color-text);
}

h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 2.5vw + 0.4rem, 2.8rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 2vw + 0.3rem, 2.2rem);
    line-height: 1.2;
    color: var(--color-text);
}

h5 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 1.25;
    color: var(--color-text);
}

h6 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text);
}

p {
    font-family: var(--font-body);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-text);
}

small {
    font-size: 1.3rem;
}

strong,
b {
    font-weight: 600;
}

.is-title {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.is-body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
}

.is-mono {
    font-family: var(--font-mono);
    font-weight: 400;
}


/* ==========================================================================
   4. Layout
   ========================================================================== */

.cb-viewport {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.cb-main {
    flex: 1 0 auto;
}

.cb-outer {
    padding-left: var(--outer-padding);
    padding-right: var(--outer-padding);
}

.cb-inner {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Ghost Article Canvas Grid */
.gh-canvas {
    display: grid;
    grid-template-columns:
        [full-start] minmax(max(4vmin, 20px), auto)
        [wide-start] minmax(auto, 240px)
        [main-start] min(720px, calc(100% - max(8vmin, 40px)))
        [main-end] minmax(auto, 240px)
        [wide-end] minmax(max(4vmin, 20px), auto)
        [full-end];
}

.gh-canvas > * {
    grid-column: main;
}

.kg-width-wide,
.gh-canvas > .kg-width-wide {
    grid-column: wide;
}

.kg-width-full,
.gh-canvas > .kg-width-full {
    grid-column: full;
}


/* ==========================================================================
   5. Neo-Brutal Components
   ========================================================================== */

/* ---- Border utility ---- */
.cb-border {
    border: var(--border);
}

/* ---- Shadow utility ---- */
.cb-shadow {
    box-shadow: var(--shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cb-shadow:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shadow-color);
}

.cb-shadow:active {
    transform: translate(0, 0);
    box-shadow: none;
}

/* ---- Button ---- */
.cb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--color-black);
    background-color: var(--color-accent);
    border: var(--border);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

.cb-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shadow-color);
}

.cb-button:active {
    transform: translate(0, 0);
    box-shadow: none;
}

.cb-button:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

/* ---- Button small ---- */
.cb-button-sm {
    padding: 10px 20px;
    font-size: 1.3rem;
}

/* ---- Button outline ---- */
.cb-button-outline {
    background-color: transparent;
    color: var(--color-text);
}

.cb-button-outline:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

/* ---- Button accent ---- */
.cb-button-accent {
    background-color: var(--color-accent);
    color: var(--color-black);
}

.cb-button-accent:hover {
    background-color: var(--color-accent-dark);
}

/* ---- Button primary ---- */
.cb-button-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.cb-button-primary:hover {
    background-color: #1d4ed8;
}

/* ---- Badge ---- */
.cb-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 2px solid var(--color-border);
    white-space: nowrap;
}

.cb-badge-primary {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.cb-badge-coral {
    background-color: var(--color-coral);
    color: var(--color-white);
    border-color: var(--color-coral);
}

.cb-badge-accent {
    background-color: var(--color-accent);
    color: var(--color-black);
    border-color: var(--color-black);
}

/* ---- Card ---- */
.cb-card {
    background-color: var(--color-card-bg);
    border: var(--border);
    box-shadow: var(--shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cb-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shadow-color);
}


/* ==========================================================================
   6. Navigation
   ========================================================================== */

.cb-navigation {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background-color: var(--color-bg);
    border-bottom: var(--border);
    padding: 0;
}

.cb-navigation-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

/* ---- Brand ---- */
.cb-navigation-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.cb-navigation-brand img {
    max-height: 40px;
    width: auto;
}

.cb-navigation-brand .cb-site-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--color-text);
    line-height: 1;
}

/* ---- Menu ---- */
.cb-navigation-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.cb-navigation-menu a {
    position: relative;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    padding: 4px 0;
    transition: color var(--transition-fast);
}

.cb-navigation-menu a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-black);
    transition: width var(--transition-base);
}

.cb-navigation-menu a:hover::after,
.cb-navigation-menu a.is-active::after {
    width: 100%;
}

.cb-navigation-menu a:hover {
    color: var(--color-black);
}

/* ---- Actions ---- */
.cb-navigation-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cb-navigation-actions .cb-button {
    padding: 10px 20px;
    font-size: 1.3rem;
}

/* ---- Dark mode toggle in nav ---- */
.cb-dark-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    font-size: 1.8rem;
    line-height: 1;
}

.cb-dark-toggle:hover {
    background-color: var(--color-near-black);
    color: var(--color-white);
}

/* ---- Burger button ---- */
.cb-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.cb-burger:hover {
    border: 2px solid var(--color-black);
}

.cb-burger svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-text);
    stroke-width: 2;
}

/* ---- Mobile menu ---- */
.cb-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-mobile-menu);
    background-color: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    padding: 32px;
}

.cb-mobile-menu.is-open {
    transform: translateX(0);
}

.cb-mobile-menu a {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.cb-mobile-menu a:hover {
    color: var(--color-primary);
}

.cb-mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid var(--color-border);
    cursor: pointer;
    font-size: 2.4rem;
    line-height: 1;
}

.cb-mobile-menu-close:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

.cb-mobile-menu-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

/* ---- Responsive navigation ---- */
@media (max-width: 1023px) {
    .cb-navigation-menu {
        display: none;
    }

    .cb-navigation-actions {
        display: none;
    }

    .cb-burger {
        display: flex;
    }
}


/* ==========================================================================
   7. Hero Section
   ========================================================================== */

.cb-hero {
    padding: 80px 0;
    border-bottom: var(--border);
}

/* ---- Featured hero: two-column layout ---- */
.cb-hero.is-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.cb-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
}

.cb-hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3.2rem, 5vw + 1rem, 5.6rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.cb-hero-excerpt {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.8rem;
    line-height: 1.5;
    color: var(--color-text-muted);
    max-width: 540px;
}

.cb-hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

.cb-hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cb-hero-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: var(--border);
    box-shadow: var(--shadow);
}

.cb-hero-image-wrapper {
    position: relative;
    overflow: hidden;
    border: var(--border);
    box-shadow: var(--shadow);
}

.cb-hero-image-wrapper img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* ---- CTA Hero variant ---- */
.cb-hero.is-cta {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cb-hero.is-cta .cb-hero-content {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
}

.cb-hero.is-cta .cb-hero-excerpt {
    margin-left: auto;
    margin-right: auto;
}

/* ---- Minimal Hero variant ---- */
.cb-hero.is-minimal {
    padding: 48px 0;
}

.cb-hero.is-minimal .cb-hero-title {
    font-size: clamp(2.4rem, 3vw + 0.5rem, 3.6rem);
}

/* ---- CTA Panel inside Hero ---- */
.cb-hero-cta-panel {
    background-color: var(--color-accent);
    padding: 48px;
    border: var(--border);
    box-shadow: var(--shadow);
}

.cb-hero-cta-panel .cb-hero-title {
    font-size: clamp(2.4rem, 3vw + 0.5rem, 3.6rem);
}

/* ---- Hero responsive ---- */
@media (max-width: 1023px) {
    .cb-hero.is-featured {
        grid-template-columns: 1fr;
    }

    .cb-hero-image-wrapper {
        order: 2;
    }

    .cb-hero-content {
        order: 1;
    }
}

@media (max-width: 767px) {
    .cb-hero {
        padding: 48px 0;
    }

    .cb-hero.is-featured {
        gap: 32px;
    }

    .cb-hero-cta-panel {
        padding: 32px;
    }
}

@media (max-width: 639px) {
    .cb-hero {
        padding: 32px 0;
    }

    .cb-hero.is-minimal {
        padding: 32px 0;
    }

    .cb-hero-cta-panel {
        padding: 24px;
    }
}


/* ==========================================================================
   8. Tag Filter
   ========================================================================== */

.cb-tag-filter {
    padding: 24px 0;
    border-bottom: var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cb-tag-filter::-webkit-scrollbar {
    display: none;
}

.cb-tag-filter-inner {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.cb-tag-pill {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 20px;
    border: 2px solid var(--color-border);
    background-color: var(--color-bg);
    color: var(--color-text);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.cb-tag-pill:hover,
.cb-tag-pill.is-active {
    background-color: var(--color-black);
    color: var(--color-white);
}


/* ==========================================================================
   9. Featured Posts
   ========================================================================== */

.cb-featured {
    padding: 48px 0;
    border-bottom: var(--border);
}

.cb-featured-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-featured-title::after {
    content: "";
    flex: 1;
    height: 3px;
    background-color: var(--color-black);
}

.cb-featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1023px) {
    .cb-featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    .cb-featured-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   10. Post Cards
   ========================================================================== */

.cb-post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--color-card-bg);
    border: var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    text-decoration: none;
    color: inherit;
}

.cb-post-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--shadow-color);
}

/* ---- Card image ---- */
.cb-post-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.cb-post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.cb-post-card:hover .cb-post-card-image img {
    transform: scale(1.03);
}

/* ---- Card featured badge ---- */
.cb-post-card-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background-color: var(--color-coral);
    color: var(--color-white);
    border: 2px solid var(--color-coral);
    white-space: nowrap;
}

/* ---- Card content ---- */
.cb-post-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb-post-card-tag {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    text-decoration: none;
}

.cb-post-card-tag:hover {
    text-decoration: underline;
}

.cb-post-card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.2;
    color: var(--color-text);
}

.cb-post-card-title a {
    color: inherit;
    text-decoration: none;
}

.cb-post-card-title a:hover {
    color: var(--color-primary);
}

.cb-post-card-excerpt {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Card meta ---- */
.cb-post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: auto;
    border-top: 2px solid var(--color-light-gray);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--color-text-muted);
}

.cb-post-card-meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cb-post-card-meta-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
}

/* ---- Post feed grid ---- */
.cb-post-feed.is-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* ---- Post feed list ---- */
.cb-post-feed.is-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.cb-post-feed.is-list .cb-post-card {
    flex-direction: row;
    max-height: 240px;
}

.cb-post-feed.is-list .cb-post-card-image {
    width: 40%;
    aspect-ratio: auto;
    flex-shrink: 0;
}

.cb-post-feed.is-list .cb-post-card-image img {
    height: 100%;
}

.cb-post-feed.is-list .cb-post-card-content {
    width: 60%;
}

/* ---- Post feed responsive ---- */
@media (min-width: 640px) and (max-width: 1023px) {
    .cb-post-feed.is-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    .cb-post-feed.is-grid {
        grid-template-columns: 1fr;
    }

    .cb-post-feed.is-list .cb-post-card {
        flex-direction: column;
        max-height: none;
    }

    .cb-post-feed.is-list .cb-post-card-image {
        width: 100%;
        aspect-ratio: 16 / 10;
    }

    .cb-post-feed.is-list .cb-post-card-content {
        width: 100%;
    }
}


/* ==========================================================================
   11. CTA Sections
   ========================================================================== */

/* ---- Inline CTA (inside post grid) ---- */
.cb-cta-inline {
    background-color: var(--color-accent);
    border: var(--border);
    box-shadow: var(--shadow);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.cb-cta-inline-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.2;
    color: var(--color-black);
}

.cb-cta-inline-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-dark-gray);
}

.cb-cta-inline .cb-button {
    align-self: flex-start;
    background-color: var(--color-black);
    color: var(--color-white);
}

.cb-cta-inline .cb-button:hover {
    background-color: var(--color-near-black);
}

/* ---- Banner CTA ---- */
.cb-cta-banner {
    padding: 64px 0;
    background-color: var(--color-near-black);
    color: var(--color-white);
    text-align: center;
}

.cb-cta-banner-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.cb-cta-banner-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 3vw + 0.5rem, 3.6rem);
    color: var(--color-white);
    line-height: 1.1;
}

.cb-cta-banner-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.6rem;
    color: var(--color-mid-gray);
    max-width: 540px;
}

.cb-cta-banner .cb-button {
    background-color: var(--color-accent);
    color: var(--color-near-black);
    border-color: var(--color-accent);
}

.cb-cta-banner .cb-button:hover {
    background-color: var(--color-accent-dark);
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 rgba(255, 255, 255, 0.2);
}

@media (max-width: 767px) {
    .cb-cta-banner {
        padding: 48px 0;
    }
}


/* ==========================================================================
   12. Article / Post
   ========================================================================== */

.gh-article {
    padding-bottom: 80px;
}

/* ---- Article header ---- */
.gh-article-header {
    padding: 80px 0 48px;
    text-align: center;
}

.gh-article-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    text-decoration: none;
    border: 2px solid var(--color-primary);
    padding: 4px 16px;
    margin-bottom: 24px;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.gh-article-tag:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.gh-article-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 4vw + 1rem, 5rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 16px;
}

.gh-article-excerpt {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    max-width: 720px;
    margin: 0 auto;
}

/* ---- Article meta ---- */
.gh-article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.gh-article-author-image img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
}

.gh-article-author-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--color-text);
}

.gh-article-meta-date {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

.gh-article-meta-sep {
    color: var(--color-light-gray);
    font-size: 1.4rem;
}

.gh-article-meta-length {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

/* ---- Feature image ---- */
.gh-article-image {
    margin-top: 48px;
    border: var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: none;
}

.gh-article-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---- Article content ---- */
.gh-content {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.8rem;
    line-height: 1.7;
    color: var(--color-text);
    word-break: break-word;
    overflow-wrap: break-word;
}

.gh-content > * + * {
    margin-top: 0;
}

.gh-content h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.8rem;
    line-height: 1.15;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--color-text);
}

.gh-content h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1.2;
    margin-top: 40px;
    margin-bottom: 12px;
    color: var(--color-text);
}

.gh-content h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 1.25;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--color-text);
}

.gh-content p {
    margin-bottom: 24px;
}

.gh-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    transition: color var(--transition-fast);
}

.gh-content a:hover {
    color: #1d4ed8;
}

.gh-content strong {
    font-weight: 600;
}

.gh-content em {
    font-style: italic;
}

.gh-content ul,
.gh-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.gh-content ul {
    list-style: disc;
}

.gh-content ol {
    list-style: decimal;
}

.gh-content li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.gh-content li::marker {
    color: var(--color-primary);
}

.gh-content blockquote {
    border-left: 5px solid var(--color-black);
    padding-left: 24px;
    font-style: italic;
    margin: 32px 0;
    font-size: 1.9rem;
    color: var(--color-text-secondary);
}

.gh-content blockquote p:last-child {
    margin-bottom: 0;
}

.gh-content pre {
    background-color: var(--color-code-bg);
    color: var(--color-code-text);
    padding: 24px;
    border: var(--border);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    line-height: 1.6;
    margin: 32px 0;
    tab-size: 4;
}

.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background-color: var(--color-surface-alt);
    padding: 2px 6px;
    border: 1px solid var(--color-light-gray);
}

.gh-content pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    font-size: inherit;
}

.gh-content img {
    border: var(--border);
    display: block;
    margin: 32px auto;
    max-width: 100%;
    height: auto;
}

.gh-content figcaption {
    text-align: center;
    font-size: 1.3rem;
    color: var(--color-text-muted);
    margin-top: 12px;
    font-family: var(--font-body);
}

.gh-content hr {
    border: none;
    height: 3px;
    background-color: var(--color-black);
    margin: 48px auto;
    max-width: 120px;
}

.gh-content table {
    width: 100%;
    margin: 32px 0;
    border: var(--border);
    border-collapse: collapse;
}

.gh-content table th {
    background-color: var(--color-surface-alt);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    text-align: left;
    border: 2px solid var(--color-border);
}

.gh-content table td {
    padding: 12px 16px;
    border: 1px solid var(--color-light-gray);
    font-size: 1.6rem;
}

.gh-content table tr:nth-child(even) {
    background-color: var(--color-surface-alt);
}

/* ---- Ghost cards ---- */
.gh-content .kg-card {
    margin: 32px 0;
}

.gh-content .kg-image-card img,
.gh-content .kg-gallery-image img {
    border: var(--border);
}

.gh-content .kg-callout-card {
    border: var(--border);
    box-shadow: var(--shadow);
}

.gh-content .kg-toggle-card {
    border: var(--border);
}

.gh-content .kg-bookmark-card {
    border: var(--border);
    box-shadow: var(--shadow);
}

.gh-content .kg-bookmark-card .kg-bookmark-container {
    text-decoration: none;
    border: none;
}

.gh-content .kg-gallery-container {
    gap: 16px;
}

.gh-content .kg-gallery-row {
    gap: 16px;
}

/* ---- Article responsive ---- */
@media (max-width: 767px) {
    .gh-article-header {
        padding: 48px 0 32px;
        text-align: left;
    }

    .gh-article-meta {
        justify-content: flex-start;
    }

    .gh-article-excerpt {
        font-size: 1.8rem;
        margin: 0;
    }

    .gh-article-image {
        margin-top: 32px;
    }

    .gh-article {
        padding-bottom: 48px;
    }

    .gh-content h2 {
        font-size: 2.4rem;
        margin-top: 40px;
    }

    .gh-content h3 {
        font-size: 2rem;
        margin-top: 32px;
    }

    .gh-content pre {
        padding: 16px;
        font-size: 1.4rem;
    }
}


/* ==========================================================================
   13. Post CTA (Member Gate)
   ========================================================================== */

.cb-post-cta {
    margin-top: 64px;
    padding: 48px;
    background-color: var(--color-accent);
    border: var(--border);
    box-shadow: var(--shadow);
    text-align: center;
}

.cb-post-cta-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.4rem;
    line-height: 1.15;
    color: var(--color-black);
    margin-bottom: 16px;
}

.cb-post-cta-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.6rem;
    color: var(--color-dark-gray);
    max-width: 540px;
    margin: 0 auto 24px;
}

.cb-post-cta .cb-button {
    background-color: var(--color-black);
    color: var(--color-white);
}

/* ---- Member gate ---- */
.cb-member-gate {
    text-align: center;
    padding: 64px 32px;
}

.cb-member-gate-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-member-gate-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-text);
}

.cb-member-gate-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.4rem;
    margin-bottom: 12px;
    color: var(--color-text);
}

.cb-member-gate-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.6rem;
    color: var(--color-text-secondary);
    max-width: 480px;
    margin: 0 auto;
}

.cb-member-gate .cb-button {
    margin-top: 24px;
}

/* ---- Content fade for gated content ---- */
.gh-content.is-gated {
    position: relative;
    max-height: 600px;
    overflow: hidden;
}

.gh-content.is-gated::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--color-bg));
    pointer-events: none;
}

@media (max-width: 767px) {
    .cb-post-cta {
        margin-top: 48px;
        padding: 32px;
    }

    .cb-member-gate {
        padding: 48px 16px;
    }
}


/* ==========================================================================
   14. Related Posts
   ========================================================================== */

.cb-related {
    padding: 64px 0;
}

.cb-related-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-related-title::after {
    content: "";
    flex: 1;
    height: 3px;
    background-color: var(--color-black);
}

.cb-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 1023px) {
    .cb-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    .cb-related-grid {
        grid-template-columns: 1fr;
    }

    .cb-related {
        padding: 48px 0;
    }
}


/* ==========================================================================
   15. Email Subscription Form
   ========================================================================== */

.cb-subscribe-form {
    display: flex;
    gap: 0;
    max-width: 540px;
    width: 100%;
}

.cb-subscribe-input {
    flex: 1;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.6rem;
    border: var(--border);
    border-right: none;
    outline: none;
    background-color: var(--color-white);
    color: var(--color-text);
    min-width: 0;
    transition: box-shadow var(--transition-fast);
}

.cb-subscribe-input::placeholder {
    color: var(--color-mid-gray);
}

.cb-subscribe-input:focus {
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

.cb-subscribe-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-black);
    background-color: var(--color-accent);
    border: var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--transition-fast);
}

.cb-subscribe-button:hover {
    background-color: var(--color-accent-dark);
}

.cb-subscribe-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.cb-subscribe-form .success-message {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--color-success);
}

.cb-subscribe-form.success .cb-subscribe-input,
.cb-subscribe-form.success .cb-subscribe-button {
    display: none;
}

.cb-subscribe-form.success .success-message {
    display: block;
}

.cb-subscribe-form .success-message {
    display: none;
}

@media (max-width: 639px) {
    .cb-subscribe-form {
        flex-direction: column;
    }

    .cb-subscribe-input {
        border-right: var(--border);
        border-bottom: none;
    }

    .cb-subscribe-button {
        border-top: none;
    }
}


/* ==========================================================================
   16. Footer
   ========================================================================== */

/* ---- Footer CTA section ---- */
.cb-footer-cta {
    padding: 80px 0;
    background-color: var(--color-near-black);
    color: var(--color-white);
    text-align: center;
}

.cb-footer-cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cb-footer-cta-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 3vw, 4rem);
    color: var(--color-white);
    margin-bottom: 16px;
    line-height: 1.1;
}

.cb-footer-cta-description {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.6rem;
    color: var(--color-mid-gray);
    max-width: 540px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

.cb-footer-cta .cb-subscribe-input {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.cb-footer-cta .cb-subscribe-input::placeholder {
    color: var(--color-mid-gray);
}

.cb-footer-cta .cb-subscribe-input:focus {
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

.cb-footer-cta .cb-subscribe-button {
    border-color: var(--color-white);
}

/* ---- Footer bar ---- */
.cb-footer-bar {
    padding: 24px 0;
    border-top: 3px solid var(--color-dark-gray);
    background-color: var(--color-near-black);
}

.cb-footer-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-mid-gray);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.4rem;
}

.cb-footer-bar-inner a {
    color: var(--color-mid-gray);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.cb-footer-bar-inner a:hover {
    color: var(--color-white);
}

.cb-footer-copyright {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cb-footer-nav {
    display: flex;
    gap: 24px;
}

.cb-footer-nav a {
    color: var(--color-mid-gray);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.cb-footer-nav a:hover {
    color: var(--color-white);
}

@media (max-width: 767px) {
    .cb-footer-cta {
        padding: 56px 0;
    }

    .cb-footer-bar-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .cb-footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}


/* ==========================================================================
   17. Tag Archive
   ========================================================================== */

.cb-archive-header {
    padding: 64px 0;
    border-bottom: var(--border);
    text-align: center;
}

.cb-archive-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 4rem;
    line-height: 1.1;
    color: var(--color-text);
}

.cb-archive-description {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.8rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    max-width: 640px;
    margin: 16px auto 0;
}

.cb-archive-count {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 1.4rem;
    color: var(--color-text-muted);
    margin-top: 8px;
}

@media (max-width: 767px) {
    .cb-archive-header {
        padding: 48px 0;
    }

    .cb-archive-title {
        font-size: 3rem;
    }
}


/* ==========================================================================
   18. Author Archive
   ========================================================================== */

.cb-author-header {
    padding: 64px 0;
    border-bottom: var(--border);
    text-align: center;
}

.cb-author-image {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: var(--border);
    box-shadow: 4px 4px 0 var(--shadow-color);
    margin: 0 auto 24px;
    display: block;
}

.cb-author-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 3.2rem;
    line-height: 1.1;
    color: var(--color-text);
}

.cb-author-bio {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    max-width: 540px;
    margin: 16px auto 0;
}

.cb-author-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

.cb-author-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cb-author-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.cb-author-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--color-border);
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.cb-author-social a:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

.cb-author-social a svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 767px) {
    .cb-author-header {
        padding: 48px 0;
    }

    .cb-author-name {
        font-size: 2.6rem;
    }

    .cb-author-image {
        width: 80px;
        height: 80px;
    }
}


/* ==========================================================================
   19. Error Pages
   ========================================================================== */

.cb-error {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 24px;
}

.cb-error-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.cb-error-code {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 12rem;
    line-height: 1;
    color: var(--color-light-gray);
    letter-spacing: -0.04em;
}

.cb-error-message {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.4rem;
    margin-top: 16px;
    color: var(--color-text);
}

.cb-error-description {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.6rem;
    color: var(--color-text-muted);
    margin-top: 12px;
    max-width: 480px;
}

.cb-error-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--color-black);
    background-color: var(--color-accent);
    border: var(--border);
    box-shadow: var(--shadow);
    cursor: pointer;
    margin-top: 32px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cb-error-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shadow-color);
}

.cb-error-link:active {
    transform: translate(0, 0);
    box-shadow: none;
}

@media (max-width: 639px) {
    .cb-error-code {
        font-size: 8rem;
    }

    .cb-error-message {
        font-size: 2rem;
    }
}


/* ==========================================================================
   20. Pagination
   ========================================================================== */

.cb-pagination {
    padding: 48px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.cb-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 10px 20px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--color-text);
    background-color: transparent;
    border: var(--border);
    box-shadow: var(--shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base), color var(--transition-base);
}

.cb-pagination a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shadow-color);
    background-color: var(--color-black);
    color: var(--color-white);
}

.cb-pagination a:active {
    transform: translate(0, 0);
    box-shadow: none;
}

.cb-pagination .page-number {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

@media (max-width: 639px) {
    .cb-pagination {
        padding: 32px 0;
        gap: 12px;
    }

    .cb-pagination a {
        padding: 8px 16px;
        font-size: 1.2rem;
    }
}


/* ==========================================================================
   21. Dark Mode
   ========================================================================== */

body.is-dark-mode {
    --color-bg: var(--color-near-black);
    --color-surface: #222222;
    --color-surface-alt: #2A2A2A;
    --color-text: #F0F0F0;
    --color-text-secondary: #CCCCCC;
    --color-text-muted: #888888;
    --color-border: #444444;
    --color-shadow: #666666;
    --color-card-bg: var(--color-dark-gray);
    --color-code-bg: #111111;
    --color-code-text: #E0E0E0;
}

body.is-dark-mode .cb-navigation {
    background-color: var(--color-near-black);
    border-bottom-color: var(--color-border);
}

body.is-dark-mode .cb-navigation-menu a::after {
    background-color: var(--color-white);
}

body.is-dark-mode .cb-tag-pill {
    border-color: var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text);
}

body.is-dark-mode .cb-tag-pill:hover,
body.is-dark-mode .cb-tag-pill.is-active {
    background-color: var(--color-white);
    color: var(--color-black);
}

body.is-dark-mode .cb-featured-title::after {
    background-color: var(--color-border);
}

body.is-dark-mode .cb-related-title::after {
    background-color: var(--color-border);
}

body.is-dark-mode .cb-post-card-meta {
    border-top-color: var(--color-border);
}

body.is-dark-mode .cb-post-card-featured {
    border-color: var(--color-coral);
}

body.is-dark-mode .gh-article-tag {
    border-color: var(--color-primary);
}

body.is-dark-mode .gh-content blockquote {
    border-left-color: var(--color-border);
}

body.is-dark-mode .gh-content hr {
    background-color: var(--color-border);
}

body.is-dark-mode .gh-content code {
    background-color: var(--color-surface-alt);
    border-color: var(--color-border);
}

body.is-dark-mode .gh-content table th {
    background-color: var(--color-surface-alt);
    border-color: var(--color-border);
}

body.is-dark-mode .gh-content table td {
    border-color: var(--color-border);
}

body.is-dark-mode .gh-content table tr:nth-child(even) {
    background-color: var(--color-surface-alt);
}

body.is-dark-mode .gh-content.is-gated::after {
    background: linear-gradient(to bottom, transparent, var(--color-near-black));
}

body.is-dark-mode .cb-button {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .cb-button-outline {
    color: var(--color-text);
    border-color: var(--color-border);
}

body.is-dark-mode .cb-button-outline:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

body.is-dark-mode .cb-post-card {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .cb-post-card:hover {
    box-shadow: 8px 8px 0 var(--color-shadow);
}

body.is-dark-mode .cb-hero-image-wrapper {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .gh-article-image {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .gh-content img {
    border-color: var(--color-border);
}

body.is-dark-mode .gh-content .kg-image-card img,
body.is-dark-mode .gh-content .kg-gallery-image img {
    border-color: var(--color-border);
}

body.is-dark-mode .gh-content .kg-callout-card {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .gh-content .kg-toggle-card {
    border-color: var(--color-border);
}

body.is-dark-mode .gh-content .kg-bookmark-card {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .cb-subscribe-input {
    background-color: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}

body.is-dark-mode .cb-subscribe-button {
    border-color: var(--color-border);
}

body.is-dark-mode .cb-dark-toggle {
    border-color: var(--color-border);
}

body.is-dark-mode .cb-dark-toggle:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

body.is-dark-mode .cb-author-image {
    border-color: var(--color-border);
    box-shadow: 4px 4px 0 var(--color-shadow);
}

body.is-dark-mode .cb-author-social a {
    border-color: var(--color-border);
}

body.is-dark-mode .cb-author-social a:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

body.is-dark-mode .cb-error-code {
    color: var(--color-dark-gray);
}

body.is-dark-mode .cb-card {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .cb-badge {
    border-color: var(--color-border);
}

body.is-dark-mode .cb-post-cta {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .cb-cta-inline {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .cb-mobile-menu {
    background-color: var(--color-near-black);
}

body.is-dark-mode .cb-mobile-menu-close {
    border-color: var(--color-border);
    color: var(--color-text);
}

body.is-dark-mode .cb-mobile-menu-close:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

body.is-dark-mode .gh-article-author-image img {
    border-color: var(--color-border);
}

body.is-dark-mode .cb-post-card-meta-author img {
    border-color: var(--color-border);
}

body.is-dark-mode .cb-pagination a {
    border-color: var(--color-border);
    box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--color-shadow);
}

body.is-dark-mode .cb-pagination a:hover {
    background-color: var(--color-white);
    color: var(--color-black);
    box-shadow: 7px 7px 0 var(--color-shadow);
}


/* ==========================================================================
   22. Responsive
   ========================================================================== */

/* ---- Tablet: max-width 1023px ---- */
@media (max-width: 1023px) {
    .cb-hero.is-featured {
        grid-template-columns: 1fr;
    }

    .cb-featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cb-post-feed.is-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .cb-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .cb-hero-content {
        order: 1;
    }

    .cb-hero-image-wrapper {
        order: 2;
    }
}

/* ---- Mobile: max-width 767px ---- */
@media (max-width: 767px) {
    .cb-post-feed.is-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cb-post-feed.is-list .cb-post-card {
        flex-direction: column;
        max-height: none;
    }

    .cb-post-feed.is-list .cb-post-card-image {
        width: 100%;
        aspect-ratio: 16 / 10;
    }

    .cb-post-feed.is-list .cb-post-card-content {
        width: 100%;
    }

    .cb-hero {
        padding: 48px 0;
    }

    .cb-hero.is-featured {
        gap: 32px;
    }

    .gh-article-header {
        padding: 48px 0 32px;
        text-align: left;
    }

    .gh-article-meta {
        justify-content: flex-start;
    }

    .gh-article-excerpt {
        margin: 0;
    }

    .cb-footer-bar-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .cb-footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cb-archive-header {
        padding: 48px 0;
    }

    .cb-author-header {
        padding: 48px 0;
    }

    .cb-cta-banner {
        padding: 48px 0;
    }

    .cb-related {
        padding: 48px 0;
    }
}

/* ---- Small mobile: max-width 639px ---- */
@media (max-width: 639px) {
    :root {
        --outer-padding: 16px;
    }

    .cb-hero {
        padding: 32px 0;
    }

    .cb-hero.is-minimal {
        padding: 24px 0;
    }

    .cb-featured {
        padding: 32px 0;
    }

    .cb-featured-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cb-related-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cb-related {
        padding: 32px 0;
    }

    .cb-post-card-content {
        padding: 16px;
    }

    .cb-post-card-title {
        font-size: 1.8rem;
    }

    .cb-post-card-excerpt {
        font-size: 1.4rem;
    }

    .gh-article-header {
        padding: 32px 0 24px;
    }

    .gh-article {
        padding-bottom: 32px;
    }

    .gh-content {
        font-size: 1.7rem;
    }

    .cb-archive-header {
        padding: 32px 0;
    }

    .cb-archive-title {
        font-size: 2.8rem;
    }

    .cb-author-header {
        padding: 32px 0;
    }

    .cb-author-name {
        font-size: 2.4rem;
    }

    .cb-pagination {
        padding: 32px 0;
        gap: 12px;
    }

    .cb-cta-banner {
        padding: 32px 0;
    }

    .cb-footer-cta {
        padding: 48px 0;
    }

    .cb-post-cta {
        padding: 24px;
        margin-top: 32px;
    }

    .cb-member-gate {
        padding: 32px 16px;
    }

    .cb-hero-cta-panel {
        padding: 24px;
    }

    .cb-cta-inline {
        padding: 24px;
    }

    .cb-subscribe-form {
        flex-direction: column;
    }

    .cb-subscribe-input {
        border-right: var(--border);
        border-bottom: none;
    }

    .cb-subscribe-button {
        border-top: none;
    }

    .cb-button {
        padding: 12px 24px;
        font-size: 1.4rem;
    }

    .cb-error-code {
        font-size: 8rem;
    }

    .cb-error-message {
        font-size: 2rem;
    }
}


/* ==========================================================================
   23. Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cb-animate {
    animation: fadeInUp 0.5s ease both;
}

.cb-animate-delay-1 {
    animation-delay: 0.1s;
}

.cb-animate-delay-2 {
    animation-delay: 0.2s;
}

.cb-animate-delay-3 {
    animation-delay: 0.3s;
}

.cb-animate-delay-4 {
    animation-delay: 0.4s;
}

.cb-animate-fade {
    animation: fadeIn 0.5s ease both;
}

.cb-animate-slide-left {
    animation: slideInLeft 0.5s ease both;
}

.cb-animate-slide-right {
    animation: slideInRight 0.5s ease both;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cb-animate,
    .cb-animate-delay-1,
    .cb-animate-delay-2,
    .cb-animate-delay-3,
    .cb-animate-delay-4,
    .cb-animate-fade,
    .cb-animate-slide-left,
    .cb-animate-slide-right {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .cb-shadow:hover {
        transform: none;
    }

    .cb-button:hover {
        transform: none;
    }

    .cb-button:active {
        transform: none;
    }

    .cb-post-card:hover {
        transform: none;
    }

    .cb-post-card:hover .cb-post-card-image img {
        transform: none;
    }

    .cb-card:hover {
        transform: none;
    }

    .cb-error-link:hover {
        transform: none;
    }

    .cb-pagination a:hover {
        transform: none;
    }

    .cb-mobile-menu {
        transition: none;
    }
}


/* ==========================================================================
   Utility Classes
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-center {
    align-items: center;
    justify-content: center;
}

.flex-between {
    justify-content: space-between;
}

.gap-8 {
    gap: 0.8rem;
}

.gap-12 {
    gap: 1.2rem;
}

.gap-16 {
    gap: 1.6rem;
}

.gap-24 {
    gap: 2.4rem;
}

.gap-32 {
    gap: 3.2rem;
}

.mt-auto {
    margin-top: auto;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-16 {
    margin-bottom: 1.6rem;
}

.mb-24 {
    margin-bottom: 2.4rem;
}

.mb-32 {
    margin-bottom: 3.2rem;
}

.mb-48 {
    margin-bottom: 4.8rem;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

.visible {
    visibility: visible;
}

.invisible {
    visibility: hidden;
}

.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================================
   Ghost-Specific Overrides & Helpers
   ========================================================================== */

/* Ghost portal button positioning */
.gh-portal-triggerbtn-container {
    z-index: 2999 !important;
}

/* Ghost notification banner */
.gh-notification {
    font-family: var(--font-body);
    border: var(--border);
    box-shadow: var(--shadow);
}

/* Ghost search */
.gh-search {
    font-family: var(--font-body);
}

/* Koenig editor card width helpers */
.kg-width-wide {
    grid-column: wide;
}

.kg-width-full {
    grid-column: full;
}

/* Koenig embed card */
.kg-embed-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 32px 0;
}

.kg-embed-card iframe {
    width: 100%;
}

/* Koenig header card */
.kg-header-card {
    border: var(--border);
    box-shadow: var(--shadow);
}

/* Koenig gallery */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    margin: 32px 0;
}

.kg-gallery-row {
    display: flex;
    gap: 16px;
}

.kg-gallery-row:not(:first-of-type) {
    margin-top: 16px;
}

.kg-gallery-image {
    flex: 1;
}

.kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Koenig button card */
.kg-button-card {
    margin: 32px 0;
    display: flex;
    justify-content: center;
}

.kg-button-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--color-black);
    background-color: var(--color-accent);
    border: var(--border);
    box-shadow: var(--shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.kg-button-card a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shadow-color);
}

/* Koenig NFT card */
.kg-nft-card {
    border: var(--border);
    box-shadow: var(--shadow);
    margin: 32px 0;
}

/* Koenig file card */
.kg-file-card {
    border: var(--border);
    box-shadow: var(--shadow);
    margin: 32px 0;
}

/* Koenig audio card */
.kg-audio-card {
    border: var(--border);
    box-shadow: var(--shadow);
    margin: 32px 0;
}

/* Koenig video card */
.kg-video-card {
    border: var(--border);
    margin: 32px 0;
}

/* Koenig product card */
.kg-product-card {
    border: var(--border);
    box-shadow: var(--shadow);
    margin: 32px 0;
}

/* Koenig signup card */
.kg-signup-card {
    border: var(--border);
    box-shadow: var(--shadow);
    margin: 32px 0;
}


/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    body {
        color: #000;
        background: #fff;
    }

    .cb-navigation,
    .cb-footer-cta,
    .cb-footer-bar,
    .cb-burger,
    .cb-mobile-menu,
    .cb-post-cta,
    .cb-member-gate,
    .cb-cta-banner,
    .cb-cta-inline,
    .cb-subscribe-form,
    .cb-pagination,
    .cb-tag-filter,
    .cb-related,
    .cb-dark-toggle,
    .gh-portal-triggerbtn-container {
        display: none !important;
    }

    .cb-shadow,
    .cb-card,
    .cb-post-card,
    .cb-button,
    .cb-error-link {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    .gh-content a {
        text-decoration: underline;
    }

    .gh-content a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .gh-article-image {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .gh-content img {
        border: 1px solid #ccc;
    }
}


/* ==========================================================================
   LANDING PAGE — CRMBooster Homepage
   ========================================================================== */


/* --- Landing: Shared Section Styles --- */

.cb-landing-section-header {
    text-align: center;
    margin-bottom: var(--space-64);
}

.cb-landing-section-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: var(--color-surface-alt);
    border: 2px solid var(--color-border);
    padding: 6px 16px;
    margin-bottom: var(--space-16);
}

.cb-landing-section-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 4vw, 4.8rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-text);
}


/* --- Landing: Hero --- */

.cb-landing-hero {
    position: relative;
    overflow: hidden;
    padding: calc(var(--nav-height) + var(--space-48)) 0 var(--space-96);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.cb-landing-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.cb-landing-hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

.cb-landing-hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.cb-landing-hero-blob--1 {
    width: 600px;
    height: 600px;
    background: #E8862A;
    top: -200px;
    right: -100px;
    animation: blobFloat 12s ease-in-out infinite;
}

.cb-landing-hero-blob--2 {
    width: 400px;
    height: 400px;
    background: var(--color-accent);
    bottom: -150px;
    left: -100px;
    animation: blobFloat 15s ease-in-out infinite reverse;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

.cb-landing-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-64);
    align-items: center;
}

.cb-landing-hero-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #E8862A;
    background: rgba(232, 134, 42, 0.1);
    border: 2px solid #E8862A;
    padding: 8px 20px;
    margin-bottom: var(--space-24);
    animation: fadeSlideUp 0.6s ease both;
}

.cb-landing-hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 6vw, 7.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: var(--space-24);
    animation: fadeSlideUp 0.6s ease 0.1s both;
}

.cb-landing-hero-title-accent {
    color: #E8862A;
    position: relative;
    display: inline-block;
}

.cb-landing-hero-title-accent::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--color-accent);
    z-index: -1;
    transform: skewX(-3deg);
}

.cb-landing-hero-description {
    font-family: var(--font-body);
    font-size: clamp(1.6rem, 1.5vw, 2rem);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-secondary);
    max-width: 520px;
    margin-bottom: var(--space-40);
    animation: fadeSlideUp 0.6s ease 0.2s both;
}

.cb-landing-hero-actions {
    display: flex;
    gap: var(--space-16);
    flex-wrap: wrap;
    animation: fadeSlideUp 0.6s ease 0.3s both;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Button variants for landing */
.cb-button--lg {
    padding: 16px 32px;
    font-size: 1.6rem;
}

.cb-button--accent {
    background: var(--color-accent);
    color: var(--color-black);
    border-color: var(--color-black);
}

.cb-button--accent:hover {
    background: #e5b800;
}

.cb-button--outline {
    background: transparent;
    color: var(--color-text);
    border: var(--border);
    box-shadow: none;
}

.cb-button--outline:hover {
    background: var(--color-surface-alt);
    box-shadow: var(--shadow);
    transform: translate(-2px, -2px);
}

.cb-button--dark {
    background: var(--color-near-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.cb-button--dark:hover {
    background: var(--color-black);
}


/* --- Landing: Connector Hub Visual --- */

.cb-landing-hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeSlideUp 0.8s ease 0.4s both;
}

.cb-connector-hub {
    position: relative;
    width: 420px;
    height: 420px;
}

.cb-connector-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--color-white);
    border: var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.cb-connector-center-icon {
    width: 40px;
    height: 40px;
}

.cb-connector-center-icon svg {
    width: 100%;
    height: 100%;
}

.cb-connector-center-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 2px;
    white-space: nowrap;
}

.cb-connector-node {
    position: absolute;
    width: 88px;
    height: 88px;
    background: var(--color-white);
    border: var(--border);
    box-shadow: 3px 3px 0 var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cb-connector-node:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--shadow-color);
}

.cb-connector-node-name {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

/* Position nodes around the hub in a circle */
.cb-connector-node--1 { top: 0; left: 50%; transform: translateX(-50%); }
.cb-connector-node--2 { top: 15%; right: 0; }
.cb-connector-node--3 { bottom: 15%; right: 0; }
.cb-connector-node--4 { bottom: 0; left: 50%; transform: translateX(-50%); }
.cb-connector-node--5 { bottom: 15%; left: 0; }
.cb-connector-node--6 { top: 15%; left: 0; }

/* Connector lines from center to each node */
.cb-connector-line {
    position: absolute;
    background: var(--color-black);
    z-index: 1;
}

.cb-connector-line--1 {
    width: 3px; height: 80px;
    top: 80px; left: 50%;
    transform: translateX(-50%);
}

.cb-connector-line--2 {
    width: 90px; height: 3px;
    top: 35%; right: 80px;
    transform: rotate(-30deg);
}

.cb-connector-line--3 {
    width: 90px; height: 3px;
    bottom: 35%; right: 80px;
    transform: rotate(30deg);
}

.cb-connector-line--4 {
    width: 3px; height: 80px;
    bottom: 80px; left: 50%;
    transform: translateX(-50%);
}

.cb-connector-line--5 {
    width: 90px; height: 3px;
    bottom: 35%; left: 80px;
    transform: rotate(-30deg);
}

.cb-connector-line--6 {
    width: 90px; height: 3px;
    top: 35%; left: 80px;
    transform: rotate(30deg);
}

/* Animated data dots traveling along lines */
.cb-connector-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E8862A;
    z-index: 3;
    opacity: 0;
}

.cb-connector-dot--1 {
    top: 80px; left: calc(50% - 5px);
    animation: dotPulse1 3s ease-in-out 0s infinite;
}
.cb-connector-dot--2 {
    top: 35%; right: 120px;
    animation: dotPulse1 3s ease-in-out 0.5s infinite;
}
.cb-connector-dot--3 {
    bottom: 35%; right: 120px;
    animation: dotPulse1 3s ease-in-out 1s infinite;
}
.cb-connector-dot--4 {
    bottom: 80px; left: calc(50% - 5px);
    animation: dotPulse1 3s ease-in-out 1.5s infinite;
}
.cb-connector-dot--5 {
    bottom: 35%; left: 120px;
    animation: dotPulse1 3s ease-in-out 2s infinite;
}
.cb-connector-dot--6 {
    top: 35%; left: 120px;
    animation: dotPulse1 3s ease-in-out 2.5s infinite;
}

@keyframes dotPulse1 {
    0% { opacity: 0; transform: scale(0.5); }
    20% { opacity: 1; transform: scale(1.2); }
    40% { opacity: 1; transform: scale(1); }
    60% { opacity: 0.5; transform: scale(0.8); }
    80%, 100% { opacity: 0; transform: scale(0.3); }
}


/* --- Landing: Logo Bar --- */

.cb-landing-logos {
    padding: var(--space-48) 0;
    border-top: var(--border);
    border-bottom: var(--border);
    background: var(--color-surface-alt);
}

.cb-landing-logos-label {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: var(--space-24);
}

.cb-landing-logos-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-32);
    flex-wrap: wrap;
}

.cb-landing-logo-item {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    padding: 8px 20px;
    border: 2px solid transparent;
    transition: all var(--transition-base);
}

.cb-landing-logo-item:hover {
    color: var(--color-text);
    border-color: var(--color-border);
    box-shadow: 3px 3px 0 var(--shadow-color);
    transform: translate(-1px, -1px);
}


/* --- Landing: Problem/Solution Split --- */

.cb-landing-split {
    padding: var(--space-96) 0;
}

.cb-landing-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-32);
}

.cb-landing-split-card {
    padding: var(--space-48);
    border: var(--border);
    position: relative;
    overflow: hidden;
}

.cb-landing-split-card--problem {
    background: var(--color-surface-alt);
}

.cb-landing-split-card--solution {
    background: var(--color-near-black);
    color: var(--color-white);
    box-shadow: 8px 8px 0 #E8862A;
}

.cb-landing-split-card--solution .cb-landing-split-card-text {
    color: rgba(255,255,255,0.75);
}

.cb-landing-split-card-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 2px solid currentColor;
    margin-bottom: var(--space-24);
}

.cb-landing-split-card--problem .cb-landing-split-card-tag {
    color: #c0392b;
    border-color: #c0392b;
}

.cb-landing-split-card--solution .cb-landing-split-card-tag {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.cb-landing-split-card-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-16);
}

.cb-landing-split-card-text {
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* Broken lines visual for problem card */
.cb-landing-split-card-visual {
    margin-top: var(--space-32);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb-landing-broken-line {
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #c0392b 0, #c0392b 20px,
        transparent 20px, transparent 30px
    );
    opacity: 0.4;
    border-radius: 2px;
}

.cb-landing-broken-line:nth-child(2) { width: 75%; }
.cb-landing-broken-line:nth-child(3) { width: 50%; }

/* Connected lines visual for solution card */
.cb-landing-connected-line {
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), #2DD4BF);
    border-radius: 2px;
    position: relative;
}

.cb-landing-connected-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2DD4BF;
}

.cb-landing-connected-line:nth-child(2) { width: 85%; }
.cb-landing-connected-line:nth-child(3) { width: 70%; }


/* --- Landing: Features --- */

.cb-landing-features {
    padding: var(--space-96) 0;
    background: var(--color-surface-alt);
    border-top: var(--border);
    border-bottom: var(--border);
}

.cb-landing-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-32);
}

.cb-landing-feature-card {
    padding: var(--space-40);
    background: var(--color-white);
    border: var(--border);
    box-shadow: var(--shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cb-landing-feature-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--shadow-color);
}

.cb-landing-feature-card--highlight {
    background: var(--color-near-black);
    color: var(--color-white);
    box-shadow: 5px 5px 0 #E8862A;
}

.cb-landing-feature-card--highlight:hover {
    box-shadow: 8px 8px 0 #E8862A;
}

.cb-landing-feature-card--highlight .cb-landing-feature-text {
    color: rgba(255,255,255,0.75);
}

.cb-landing-feature-card--highlight .cb-landing-feature-icon {
    color: var(--color-accent);
}

.cb-landing-feature-icon {
    width: 56px;
    height: 56px;
    margin-bottom: var(--space-24);
    color: #E8862A;
}

.cb-landing-feature-icon svg {
    width: 100%;
    height: 100%;
}

.cb-landing-feature-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: var(--space-12);
}

.cb-landing-feature-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}


/* --- Landing: Steps --- */

.cb-landing-steps {
    padding: var(--space-96) 0;
}

.cb-landing-steps-grid {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
}

.cb-landing-step {
    flex: 1;
    max-width: 320px;
    text-align: center;
    padding: 0 var(--space-24);
}

.cb-landing-step-number {
    font-family: var(--font-display);
    font-size: 5.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-surface-alt);
    -webkit-text-stroke: 3px var(--color-border);
    margin-bottom: var(--space-16);
}

.cb-landing-step-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-8);
}

.cb-landing-step-text {
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.cb-landing-step-connector {
    flex: 0 0 80px;
    padding-top: 36px;
}


/* --- Landing: Pricing --- */

.cb-landing-pricing {
    padding: var(--space-96) 0;
    background: var(--color-surface-alt);
    border-top: var(--border);
    border-bottom: var(--border);
}

.cb-landing-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-32);
    align-items: start;
}

.cb-landing-pricing-card {
    padding: var(--space-40);
    background: var(--color-white);
    border: var(--border);
    box-shadow: var(--shadow);
    position: relative;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cb-landing-pricing-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shadow-color);
}

.cb-landing-pricing-card--featured {
    border-width: 4px;
    box-shadow: 6px 6px 0 #E8862A;
    transform: scale(1.04);
    z-index: 1;
}

.cb-landing-pricing-card--featured:hover {
    transform: scale(1.04) translate(-2px, -2px);
    box-shadow: 8px 8px 0 #E8862A;
}

.cb-landing-pricing-badge {
    position: absolute;
    top: -1px;
    right: 24px;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 6px 16px;
    background: var(--color-accent);
    color: var(--color-black);
    border: 2px solid var(--color-black);
    border-top: none;
}

.cb-landing-pricing-card-header {
    margin-bottom: var(--space-32);
    padding-bottom: var(--space-24);
    border-bottom: 2px dashed var(--color-light-gray);
}

.cb-landing-pricing-tier {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-8);
}

.cb-landing-pricing-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.cb-landing-pricing-amount {
    font-family: var(--font-display);
    font-size: 4.2rem;
    font-weight: 800;
    line-height: 1;
}

.cb-landing-pricing-period {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

.cb-landing-pricing-features {
    list-style: none;
    margin-bottom: var(--space-32);
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.cb-landing-pricing-features li {
    font-size: 1.5rem;
    padding-left: 24px;
    position: relative;
    color: var(--color-text-secondary);
}

.cb-landing-pricing-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 12px;
    height: 7px;
    border-left: 3px solid #E8862A;
    border-bottom: 3px solid #E8862A;
    transform: rotate(-45deg);
}

.cb-landing-pricing-cta {
    width: 100%;
    text-align: center;
    justify-content: center;
}


/* --- Landing: Stats --- */

.cb-landing-stats {
    padding: var(--space-80) 0;
    background: var(--color-near-black);
    color: var(--color-white);
    border-bottom: 4px solid var(--color-accent);
}

.cb-landing-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-48);
    text-align: center;
}

.cb-landing-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.cb-landing-stat-value {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 4vw, 5.6rem);
    font-weight: 800;
    line-height: 1;
    color: var(--color-accent);
}

.cb-landing-stat-label {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.6);
}


/* --- Landing: Blog Section --- */

.cb-landing-blog {
    padding: var(--space-96) 0;
}

.cb-landing-blog .cb-tag-filter {
    padding: 0;
    border: none;
    margin-bottom: var(--space-40);
}


/* --- Landing: Final CTA --- */

.cb-landing-final-cta {
    padding: var(--space-96) 0;
    background: var(--color-surface-alt);
    border-top: var(--border);
}

.cb-landing-final-cta-inner {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    padding: var(--space-64);
    background: var(--color-white);
    border: 4px solid var(--color-black);
    box-shadow: 8px 8px 0 #E8862A;
}

.cb-landing-final-cta-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 3.5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-16);
}

.cb-landing-final-cta-text {
    font-size: 1.7rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-32);
}

.cb-landing-final-cta-actions {
    display: flex;
    justify-content: center;
}


/* --- Landing: Responsive --- */

@media (max-width: 1023px) {
    .cb-landing-hero-inner {
        grid-template-columns: 1fr;
        gap: var(--space-48);
    }

    .cb-landing-hero {
        min-height: auto;
        padding: calc(var(--nav-height) + var(--space-32)) 0 var(--space-64);
    }

    .cb-landing-hero-visual {
        order: -1;
    }

    .cb-connector-hub {
        width: 320px;
        height: 320px;
    }

    .cb-connector-node {
        width: 70px;
        height: 70px;
    }

    .cb-connector-node-name {
        font-size: 0.9rem;
    }

    .cb-connector-center {
        width: 80px;
        height: 80px;
    }

    .cb-connector-center-label {
        font-size: 0.8rem;
    }

    .cb-landing-split-grid {
        grid-template-columns: 1fr;
    }

    .cb-landing-features-grid {
        grid-template-columns: 1fr;
    }

    .cb-landing-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .cb-landing-pricing-card--featured {
        transform: none;
    }

    .cb-landing-pricing-card--featured:hover {
        transform: translate(-2px, -2px);
    }

    .cb-landing-steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .cb-landing-step-connector {
        transform: rotate(90deg);
        flex: 0 0 40px;
        width: 80px;
    }

    .cb-landing-stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-32);
    }
}

@media (max-width: 639px) {
    .cb-landing-hero-title {
        font-size: clamp(3.2rem, 8vw, 4.8rem);
    }

    .cb-connector-hub {
        width: 260px;
        height: 260px;
    }

    .cb-connector-node {
        width: 58px;
        height: 58px;
    }

    .cb-connector-node-name {
        font-size: 0.8rem;
    }

    .cb-connector-center {
        width: 64px;
        height: 64px;
    }

    .cb-connector-center-icon {
        width: 28px;
        height: 28px;
    }

    .cb-connector-center-label {
        display: none;
    }

    .cb-landing-split-card {
        padding: var(--space-32);
    }

    .cb-landing-feature-card {
        padding: var(--space-32);
    }

    .cb-landing-pricing-card {
        padding: var(--space-32);
    }

    .cb-landing-final-cta-inner {
        padding: var(--space-40);
    }

    .cb-landing-hero-actions {
        flex-direction: column;
    }

    .cb-landing-hero-actions .cb-button {
        width: 100%;
        justify-content: center;
    }
}
