/* ============================================================
   BLOG HOMEPAGE — v2 Editorial Redesign
   ============================================================ */

/* ----- HERO: White bg + colour blob + polaroid portrait left / text right ----- */

.blg-hero {
    position: relative;
    overflow: hidden;
    height: 90vh;
    min-height: 640px;
    background: var(--white);
}

/* Airmail stripe at the bottom */
.blg-hero::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 14px;
    z-index: 20;
    background: repeating-linear-gradient(
        -45deg,
        var(--airmail-red)  0px,
        var(--airmail-red)  10px,
        var(--white)        10px,
        var(--white)        20px,
        var(--airmail-blue) 20px,
        var(--airmail-blue) 30px,
        var(--white)        30px,
        var(--white)        40px
    );
}

/* Airmail stripe at the very top */
.blg-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 14px;
    z-index: 20;
    background: repeating-linear-gradient(
        -45deg,
        var(--airmail-red)  0px,
        var(--airmail-red)  10px,
        var(--white)        10px,
        var(--white)        20px,
        var(--airmail-blue) 20px,
        var(--airmail-blue) 30px,
        var(--white)        30px,
        var(--white)        40px
    );
}

/* Colour blob — bottom-left corner, organic wave shape */
.blg-hero__bg-blob {
    position: absolute;
    bottom: -15%;
    left: -12%;
    width: clamp(340px, 46vw, 620px);
    height: clamp(320px, 55vh, 580px);
    border-radius: 40% 60% 30% 70% / 50% 30% 70% 50%;
    z-index: 0;
    opacity: 0.75;
}

/* Content row: portrait left + text right, anchored top-left */
.blg-hero__content {
    position: absolute;
    top: 10%;
    left: 16%;   /* clears left peek image (~176px visible edge) */
    right: 7%;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* Portrait wrapper — 500px image + 10px padding each side = 520px outer */
.blg-hero__portrait-wrap {
    flex-shrink: 0;
    width: 520px;
    position: relative;
    z-index: 8;
}

/* Polaroid frame — rounded corners */
.blg-hero__portrait {
    background: var(--white);
    padding: 10px 10px 48px;
    box-shadow: 0 18px 56px rgba(42,37,32,0.20);
    border-radius: 12px;
    position: relative;
}

.blg-hero__portrait img,
.blg-hero__portrait-placeholder {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: 6px;
    background: var(--sky);
}

/* Text column: starts flush at portrait's right edge, only h1 overlaps */
.blg-hero__text-col {
    flex: 1;
    position: relative;
    z-index: 12;
    padding-top: 48px;
}

/* Title — blue, extends left into portrait by 70px */
.blg-hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 4.4rem) !important;
    color: var(--airmail-blue-dark) !important;
    line-height: 1.05 !important;
    margin: 0 0 0.5em !important;
    margin-left: -70px !important;
}

/* CTA link (homepage) — same position as subtitle */
.blg-hero__cta {
    display: inline-block;
    margin-top: 0;
    padding-left: 1em;
}

/* Subtitle — starts flush at portrait's right edge, no overlap */
.blg-hero__sub {
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    color: var(--ink);
    line-height: 1.65;
    margin: 0;
    max-width: 400px;
    padding-left: 1em;
}

/* Peek images — polaroid style, asymmetric and staggered */
.blg-hero__peek {
    position: absolute;
    z-index: 9;
    background: var(--white);
    box-shadow: 0 12px 36px rgba(42,37,32,0.16);
    border-radius: 10px;
    padding: 7px 7px 30px;
}

.blg-hero__peek img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 5px;
}

/* Left peek: taller, higher, shows ~80% */
.blg-hero__peek--l {
    width: 220px;
    height: 300px;
    bottom: 28%;
    left: -44px;   /* 20% of 220px hidden */
}

/* Right peek: lower, shows 75% — 25% of 200px = 50px hidden */
.blg-hero__peek--r {
    width: 200px;
    height: 300px;
    bottom: 16%;
    right: -50px;
}

/* Scroll hint */
.blg-hero__sub-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 14%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blg-hero__scroll-hint {
    display: none;
    font-size: 1.4rem;
    color: var(--airmail-blue-dark);
    text-decoration: none;
    animation: blg-bob 2s ease-in-out infinite;
}
@media (max-width: 680px) {
    .blg-hero__scroll-hint { display: inline-block; }
}

@keyframes blg-bob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(7px); }
}

/* Responsive */
@media (max-width: 1100px) {
    .blg-hero__content { left: 12%; }
    .blg-hero__portrait-wrap { width: 420px; }
    .blg-hero__portrait img { height: 420px; }
    .blg-hero h1 { margin-left: -50px !important; }
}

@media (max-width: 680px) {
    .blg-hero { height: auto; min-height: 0; padding-bottom: 14px; }
    .blg-hero__content { flex-direction: column; align-items: center; position: relative; top: auto; left: auto; right: auto; padding: 40px 5% 20px; }
    .blg-hero__portrait-wrap { width: 90%; max-width: 320px; }
    .blg-hero__portrait img { height: 300px; }
    .blg-hero h1 { margin-left: 0 !important; }
    .blg-hero__sub { padding-left: 0; }
    .blg-hero__peek { display: none; }
}

/* ----- Category pills ----- */

.blg-cats {
    padding: 28px 0 16px;
    background: var(--offwhite);
}

.blg-cats__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blg-cat-pill {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--sky-deep);
    background: var(--white);
    color: var(--ink-mid);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.blg-cat-pill:hover,
.blg-cat-pill.is-active {
    background: var(--airmail-blue);
    border-color: var(--airmail-blue-dark);
    color: var(--white);
}

/* ============================================================
   FEATURED LATEST POST — 55 / 45 split
   ============================================================ */

.blg-latest {
    padding: 72px 0 80px;
    background: var(--offwhite);
}

.blg-latest__card {
    display: grid;
    grid-template-columns: 55fr 45fr;
    border-radius: var(--radius-card);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    background: var(--white);
    min-height: 480px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.blg-latest__card:hover {
    box-shadow: var(--shadow-hover);
}

.blg-latest__img-col {
    overflow: hidden;
    position: relative;
}

.blg-latest__img {
    width: 100%;
    height: 100%;
    min-height: 480px;
    background-size: cover;
    background-position: center;
    background-color: var(--sky);
}

.blg-latest__body {
    padding: 60px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}


.blg-latest__cat {
    display: inline-block;
    background: var(--butter);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    width: fit-content;
}

.blg-latest__title {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem) !important;
    color: var(--ink) !important;
    line-height: 1.2 !important;
    margin: 6px 0 4px !important;
}

.blg-latest__excerpt {
    font-size: 1rem;
    color: var(--ink-mid);
    line-height: 1.75;
    flex: 1;
}

.blg-latest__meta time {
    font-size: 0.85rem;
    color: var(--ink-mid);
    opacity: 0.65;
    display: block;
    margin-bottom: 20px;
}


/* ============================================================
   POSTS GRID — Portrait cards, full-bleed image + overlay
   ============================================================ */

.blg-grid-section {
    padding: 64px 0 80px;
    background: var(--offwhite);
}

.blg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 52px;
}

.blg-card {
    display: block;
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    text-decoration: none;
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition), transform var(--transition);
}

.blg-card:hover {
    box-shadow: var(--shadow-hover);
}

.blg-card__img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--sky);
}


.blg-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: linear-gradient(
        to top,
        rgba(42, 37, 32, 0.86)  0%,
        rgba(42, 37, 32, 0.40) 42%,
        rgba(42, 37, 32, 0.00) 65%
    );
    display: flex;
    align-items: flex-end;
}

.blg-card__overlay-inner {
    padding: 24px 22px;
    width: 100%;
}

.blg-card__overlay-inner h3 {
    font-size: 1.05rem !important;
    color: var(--white) !important;
    line-height: 1.3 !important;
    margin: 0 0 6px !important;
}

.blg-card__overlay-inner time {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.68);
    display: block;
}

/* ----- Pagination ----- */

.blg-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.blg-pagination a,
.blg-pagination span {
    display: inline-block;
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--sky-deep);
    background: var(--white);
    color: var(--ink-mid);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.blg-pagination a:hover {
    background: var(--airmail-blue);
    border-color: var(--airmail-blue-dark);
    color: var(--white);
}

.blg-pagination .current {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

/* ----- Empty state ----- */

.blg-empty {
    padding: 80px 0;
    background: var(--offwhite);
}

.blg-empty__img {
    width: 120px;
    margin: 0 auto 24px;
    display: block;
    opacity: 0.7;
    animation: float 5s ease-in-out infinite;
}

.blg-empty h2 { font-size: 2rem; margin-bottom: 12px; }
.blg-empty p  { color: var(--ink-mid); font-size: 1.05rem; margin-bottom: 28px; }

/* ============================================================
   FULL-WIDTH IMAGE BREAK
   ============================================================ */

.blg-break {
    width: 100%;
    height: 420px;
    overflow: hidden;
    display: block;
    line-height: 0;
}

.blg-break__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ============================================================
   NEWSLETTER CTA
   ============================================================ */

.blg-newsletter {
    background: var(--sky);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.blg-newsletter::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 360px; height: 360px;
    background: var(--peach);
    border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
    opacity: 0.28;
    animation: float 9s ease-in-out infinite;
}

.blg-newsletter::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 260px; height: 260px;
    background: var(--sage-light);
    border-radius: 45% 55% 60% 40% / 55% 40% 60% 45%;
    opacity: 0.22;
    animation: float 11s 2s ease-in-out infinite;
}

.blg-newsletter__eyebrow {
    display: inline-block;
    background: var(--sage-dark);
    color: var(--white);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 18px;
    border-radius: var(--radius-pill);
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
}

.blg-newsletter h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--ink);
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}

.blg-newsletter .lmibc-container > p {
    color: var(--ink-mid);
    font-size: 1.08rem;
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
}

.blg-newsletter__form {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ============================================================
   RESPONSIVE — Blog
   ============================================================ */

@media (max-width: 1024px) {
    .blg-hero, .blg-hero__inner { min-height: 560px; }

    .blg-hero__photo--lg { width: 190px; height: 225px; }
    .blg-hero__photo--md { width: 155px; height: 185px; }
    .blg-hero__photo--sm { width: 130px; height: 155px; }

    .blg-hero__photo--a { top: 4%;    left: 2%; }
    .blg-hero__photo--b { bottom: 6%; left: 8%; }
    .blg-hero__photo--c { top: 4%;    right: 2%; }
    .blg-hero__photo--d { bottom: 6%; right: 6%; }

    .blg-latest__card { grid-template-columns: 1fr 1fr; min-height: 400px; }
    .blg-latest__img  { min-height: 400px; }
    .blg-latest__body { padding: 40px 36px; }

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

@media (max-width: 640px) {
    .blg-hero, .blg-hero__inner { min-height: 480px; }
    .blg-hero__inner { padding: 60px 20px 48px; }

    .blg-hero__photo--d { display: none; }
    .blg-hero__photo--a { top: 2%;    left: -3%; }
    .blg-hero__photo--b { bottom: 2%; left: 0; }
    .blg-hero__photo--c { top: 2%;    right: -3%; }

    .blg-hero__photo--lg { width: 120px; height: 145px; }
    .blg-hero__photo--md { width: 105px; height: 125px; }
    .blg-hero__photo--sm { width: 90px;  height: 110px; }

    .blg-hero__text { max-width: 100%; padding: 28px 22px; }

    .blg-latest__card { grid-template-columns: 1fr; }
    .blg-latest__img, .blg-latest__img-col { min-height: 260px; }
    .blg-latest__body { padding: 32px 28px; }

    .blg-grid { grid-template-columns: 1fr; }

    .blg-break { height: 240px; }
    .blg-newsletter { padding: 72px 0; }
}

