/* Blog: one home for every post, with topic tabs. Builds on home.css. */

.bl-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 80px;
    background: var(--home-cream);
}

.bl-hero .home-container {
    position: relative;
    z-index: 1;
}

.bl-hero-text { max-width: 640px; }

.home-new.bl-hero h1 {
    margin: 14px 0 0;
    color: var(--home-ink);
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: 0;
}

.home-new.bl-hero h1 span { color: var(--home-rust); }

.bl-lede {
    margin: 22px 0 0;
    color: var(--home-muted);
    font-size: 19px;
    line-height: 1.65;
}

/* Circles cluster on the right, like stacked topic bubbles */
.bl-art {
    position: absolute;
    top: 50%;
    right: max(24px, calc((100% - 1200px) / 2));
    width: 420px;
    height: 360px;
    transform: translateY(-50%);
    pointer-events: none;
}

.bl-c {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--home-ink);
    font-weight: 800;
    text-align: center;
    line-height: 1.15;
    animation: home-circle-float 10s ease-in-out infinite;
}

.bl-c1 { top: 0; left: 40px; width: 200px; height: 200px; background: var(--home-orange); font-size: 20px; }
.bl-c2 { top: 30px; right: 0; width: 150px; height: 150px; background: #a8d1c3; font-size: 17px; animation-delay: -3s; }
.bl-c3 { bottom: 0; left: 150px; width: 170px; height: 170px; background: var(--home-gold); font-size: 18px; animation-delay: -6s; }
.bl-c4 { bottom: 40px; left: 0; width: 70px; height: 70px; background: var(--home-rust); animation-delay: -2s; }
.bl-c5 { bottom: 20px; right: 40px; width: 34px; height: 34px; background: var(--home-teal); animation-delay: -5s; }

/* Featured post */
.bl-featured-wrap { padding: 64px 0 0; background: white; }

.bl-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    overflow: hidden;
    border-radius: 24px;
    background: var(--home-teal);
    color: #d3dee3;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bl-featured:hover { transform: translateY(-3px); box-shadow: 0 24px 50px rgb(26 40 51 / 22%); }

.bl-featured img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}

.bl-featured-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 40px 44px;
}

.bl-featured .bl-tag { background: var(--home-gold); color: var(--home-ink); }

.home-new .bl-featured h2 {
    margin: 0;
    color: white;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.bl-featured p { margin: 0; font-size: 17px; line-height: 1.6; }

.bl-featured .bl-more { color: var(--home-gold); }

/* Tabs */
.bl-list { background: white; }

.bl-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 36px;
    padding: 0;
    list-style: none;
}

.bl-tab {
    padding: 11px 22px;
    border: 1px solid #ece2d4;
    border-radius: 999px;
    background: #faf8f4;
    color: var(--home-ink);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bl-tab:hover { border-color: var(--home-orange); }

.bl-tab[aria-selected="true"] {
    border-color: var(--home-teal);
    background: var(--home-teal);
    color: white;
}

.bl-tab span {
    margin-left: 6px;
    color: inherit;
    font-weight: 400;
    opacity: 0.7;
}

/* Cards */
.bl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.bl-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ece6dc;
    border-radius: 20px;
    background: white;
    color: var(--home-ink);
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bl-card:hover {
    transform: translateY(-3px);
    border-color: var(--home-orange);
    box-shadow: 0 18px 40px rgb(26 40 51 / 12%);
}

.bl-card[hidden] { display: none; }

.bl-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f3ede3;
}

.bl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bl-card:hover .bl-thumb img { transform: scale(1.04); }

/* Brand tile for posts without a photo */
.bl-thumb-brand {
    background: var(--home-teal);
}

.bl-thumb-brand::before,
.bl-thumb-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.bl-thumb-brand::before { top: -40px; left: -30px; width: 150px; height: 150px; background: var(--home-orange); }
.bl-thumb-brand::after { right: -30px; bottom: -50px; width: 130px; height: 130px; background: var(--home-gold); }

.bl-thumb-brand img {
    position: relative;
    z-index: 1;
    display: block;
    width: 56%;
    height: auto;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
    object-fit: contain;
}

.bl-card:hover .bl-thumb-brand img { transform: translateY(-50%); }

.bl-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 22px 24px 24px;
}

.bl-tag {
    align-self: flex-start;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bl-tag-grow { background: #fdf0e3; color: #9a5422; }
.bl-tag-pro { background: #e2eee8; color: #234857; }
.bl-tag-news { background: #fbf3d9; color: #7a5f0e; }

.home-new .bl-card h3 {
    margin: 0;
    color: var(--home-ink);
    font-size: 20px;
    line-height: 1.3;
}

.bl-card p {
    margin: 0;
    color: var(--home-muted);
    font-size: 15px;
    line-height: 1.6;
}

.bl-more {
    margin-top: auto;
    padding-top: 6px;
    color: var(--home-rust);
    font-size: 15px;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .bl-c { animation: none; }
}

@media (max-width: 1100px) {
    .bl-art { right: -60px; opacity: 0.9; }
    .bl-hero-text { max-width: 560px; }
}

@media (max-width: 960px) {
    .bl-art { display: none; }
    .bl-hero-text { max-width: none; }
    .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bl-featured { grid-template-columns: 1fr; }
    .bl-featured img { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
    .bl-hero { padding: 56px 0; }
    .bl-featured-wrap { padding-top: 40px; }
    .bl-featured-body { padding: 26px 22px 28px; }
    .bl-grid { grid-template-columns: 1fr; }
    .bl-tab { padding: 9px 16px; font-size: 15px; }
}

.bl-hero .home-eyebrow { color: var(--home-rust); }

/* The featured post already sits above the grid, so skip its card under "All" */
.bl-grid[data-view="all"] .bl-card[data-featured] { display: none; }

/* ---- Depth pass ---- */
.home-new.bl-hero h1 span { color: var(--home-orange); }

.bl-hero {
    padding-bottom: 150px;
    background:
        radial-gradient(60% 80% at 85% 40%, rgb(232 152 72 / 14%), transparent 70%),
        radial-gradient(50% 70% at 0% 100%, rgb(168 209 195 / 22%), transparent 70%),
        var(--home-cream);
}

.bl-c { box-shadow: 0 22px 44px rgb(26 40 51 / 14%), inset 0 -10px 24px rgb(0 0 0 / 6%); }

/* Featured card overlaps the hero */
.bl-featured-wrap {
    position: relative;
    z-index: 2;
    margin-top: -100px;
    padding-top: 0;
    background: linear-gradient(180deg, transparent 100px, white 100px);
}

.bl-featured {
    box-shadow: 0 30px 60px rgb(26 40 51 / 22%), 0 6px 16px rgb(26 40 51 / 10%);
}

.bl-featured:hover { box-shadow: 0 38px 70px rgb(26 40 51 / 28%), 0 8px 20px rgb(26 40 51 / 12%); }

/* Soft tinted backdrop behind the posts */
.bl-list {
    padding-top: 72px;
    background: linear-gradient(180deg, white 0%, #f6f1ea 100%);
}

.bl-tabs {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 40px;
    padding: 8px;
    border-radius: 999px;
    background: white;
    box-shadow: 0 12px 30px rgb(26 40 51 / 10%);
}

.bl-tab { border-color: transparent; background: transparent; }
.bl-tab[aria-selected="true"] { box-shadow: 0 6px 14px rgb(35 72 87 / 30%); }

.bl-card {
    border-color: transparent;
    box-shadow: 0 10px 26px rgb(26 40 51 / 8%), 0 2px 6px rgb(26 40 51 / 5%);
}

.bl-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 50px rgb(26 40 51 / 16%), 0 4px 10px rgb(26 40 51 / 6%);
}

.bl-thumb::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, rgb(26 40 51 / 18%));
    pointer-events: none;
}

.bl-tag { box-shadow: inset 0 0 0 1px rgb(0 0 0 / 4%); }

@media (max-width: 960px) {
    .bl-hero { padding-bottom: 120px; }
    .bl-featured-wrap { margin-top: -80px; background: linear-gradient(180deg, transparent 80px, white 80px); }
}

@media (max-width: 640px) {
    .bl-hero { padding-bottom: 100px; }
    .bl-featured-wrap { margin-top: -64px; background: linear-gradient(180deg, transparent 64px, white 64px); }
    .bl-list { padding-top: 48px; }
    .bl-tabs { border-radius: 24px; justify-content: center; }
}

/* Keep the circles clear of the overlapping featured card */
.bl-art { top: 48px; transform: none; height: 340px; }
.bl-c3 { bottom: 10px; }

@media (max-width: 1100px) {
    .bl-art { right: 16px; transform: scale(0.78); transform-origin: top right; opacity: 1; }
}
