/* =====================================================================
   RACCOONS & FRIENDS — COMICS
   Archive + Single Strip
   ===================================================================== */

/* ── Shared tag pill ── */
.cmx-tag {
    display: inline-block;
    background: var(--sky);
    color: var(--ink-mid);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

/* =====================================================================
   ARCHIVE HERO
   ===================================================================== */
.cmx-hero {
    position: relative;
    overflow: hidden;
    background: var(--white);
    padding: 72px 0 56px;
}


/* Colour blobs */
.cmx-hero__blob {
    position: absolute;
    bottom: -20%;
    left: -8%;
    width: clamp(280px, 40vw, 520px);
    height: clamp(260px, 48vh, 480px);
    background: var(--peach, #F5C9A8);
    border-radius: 42% 58% 35% 65% / 48% 32% 68% 52%;
    opacity: 0.55;
    z-index: 0;
}

/* Second blob top-right */
.cmx-hero__blob--2 {
    background: var(--sky) !important;
    bottom: auto;
    top: -20%;
    left: auto;
    right: -8%;
    border-radius: 58% 42% 65% 35% / 32% 68% 52% 48%;
}

.cmx-hero__inner {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 48px;
}

.cmx-hero__text { flex: 1; }

.cmx-hero__eyebrow {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--airmail-blue-dark);
    margin: 0 0 0.5em;
}

.cmx-hero__text h1 {
    font-size: clamp(2.8rem, 6vw, 5rem) !important;
    color: var(--ink) !important;
    line-height: 1 !important;
    margin: 0 0 0.3em !important;
}

.cmx-hero__text h1 span {
    color: var(--airmail-blue-dark);
}

.cmx-hero__sub {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--ink-mid);
    max-width: 480px;
    margin: 0;
}

/* Placeholder for character illustration */
.cmx-hero__characters {
    flex-shrink: 0;
    width: clamp(180px, 22vw, 280px);
}

.cmx-hero__char-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--sky);
    border-radius: 50%;
    opacity: 0.4;
}

/* Bottom stripe */
.cmx-hero__stripe {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 14px;
    background: repeating-linear-gradient(
        -45deg,
        var(--airmail-blue)  0px,
        var(--airmail-blue) 10px,
        var(--white)        10px,
        var(--white)        20px
    );
    z-index: 5;
}

/* =====================================================================
   ARCHIVE GRID
   ===================================================================== */
.cmx-grid-section {
    padding: 64px 0 96px;
    background: #faf8f5;
}

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

/* Card */
.cmx-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(42,37,32,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cmx-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(42,37,32,0.14);
}

/* Square cover image */
.cmx-card__img {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--sky);
}

.cmx-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s ease;
}

.cmx-card:hover .cmx-card__img img {
    transform: scale(1.04);
}

.cmx-card__img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--sky);
}

/* Panel count badge */
.cmx-card__count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(42,37,32,0.75);
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.04em;
}

/* Card body */
.cmx-card__body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.cmx-card__date {
    font-size: 0.78rem;
    color: var(--ink-mid);
    opacity: 0.7;
}

.cmx-card__body h2 {
    font-size: 1.15rem !important;
    color: var(--ink) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.cmx-card__body p {
    font-size: 0.88rem;
    color: var(--ink-mid);
    margin: 0;
    line-height: 1.55;
}


/* Empty state */
.cmx-empty {
    padding: 80px 0;
}
.cmx-empty p {
    font-size: 1.2rem;
    color: var(--ink-mid);
    margin-bottom: 24px;
}

/* =====================================================================
   SINGLE STRIP — HEADER
   ===================================================================== */
.cmx-single { background: #faf8f5; }

.cmx-strip-header {
    background: var(--white);
    padding: 10px 0 32px;
    border-bottom: 1px solid #ede8e2;
}

.cmx-back {
    display: inline-block;
    font-size: 0.88rem;
    color: var(--airmail-blue-dark);
    text-decoration: none;
    margin-bottom: 20px;
    transition: opacity 0.2s;
}
.cmx-back:hover { opacity: 0.7; }

.cmx-strip-header__inner h1 {
    font-size: clamp(1.8rem, 4vw, 3rem) !important;
    color: var(--ink) !important;
    margin: 0 0 12px !important;
}

.cmx-strip-header__desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink-mid);
    margin: 8px 0 16px;
    max-width: 640px;
}

.cmx-strip-header__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* =====================================================================
   CAROUSEL
   ===================================================================== */
.cmx-carousel-section {
    padding: 48px 0;
    background: #faf8f5;
    display: flex;
    justify-content: center;
}

.cmx-carousel {
    position: relative;
    width: min(600px, 92vw);
    margin: 0 auto;
}

/* Viewport — clips the sliding track */
.cmx-carousel__viewport {
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(42,37,32,0.14);
}

/* Track — slides sit side by side, moves via JS translateX */
.cmx-carousel__track {
    display: flex;
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Each slide — square */
.cmx-carousel__slide {
    flex: 0 0 100%;
    aspect-ratio: 1 / 1;
    background: var(--white);
    overflow: hidden;
}

.cmx-carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Arrows */
.cmx-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid #e0d8d0;
    color: var(--ink);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(42,37,32,0.12);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.cmx-carousel__arrow:hover {
    background: var(--airmail-blue);
    border-color: var(--airmail-blue-dark);
    color: var(--white);
}

.cmx-carousel__arrow--prev { left: -22px; }
.cmx-carousel__arrow--next { right: -22px; }

/* Dots */
.cmx-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.cmx-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #d0c8c0;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.cmx-carousel__dot.is-active {
    background: var(--airmail-blue);
    transform: scale(1.3);
}

/* Counter */
.cmx-carousel__counter {
    text-align: center;
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--ink-mid);
    font-weight: 600;
}

/* =====================================================================
   STRIP DESCRIPTION
   ===================================================================== */
.cmx-strip-desc {
    padding: 40px 0;
    background: #faf8f5;
}

.cmx-strip-desc .lmibc-container {
    max-width: 640px;
}

.cmx-strip-desc p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink-mid);
    margin: 0;
}

/* =====================================================================
   PREV / NEXT NAVIGATION
   ===================================================================== */
.cmx-strip-nav {
    background: var(--white);
    border-top: 1px solid #ede8e2;
    padding: 32px 0;
}

.cmx-strip-nav__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.cmx-strip-nav__link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: opacity 0.2s;
}
.cmx-strip-nav__link:hover { opacity: 0.7; }

.cmx-strip-nav__link--next {
    text-align: right;
}

.cmx-strip-nav__dir {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--airmail-blue-dark);
}

.cmx-strip-nav__title {
    font-size: 0.95rem;
    color: var(--ink);
}

.cmx-strip-nav__all {
    font-size: 0.85rem;
    color: var(--ink-mid);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: color 0.2s;
}
.cmx-strip-nav__all:hover { color: var(--airmail-blue-dark); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
    .cmx-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .cmx-hero__characters { display: none; }
}

@media (max-width: 600px) {
    .cmx-grid { grid-template-columns: 1fr; gap: 20px; }
    .cmx-carousel__arrow--prev { left: -14px; }
    .cmx-carousel__arrow--next { right: -14px; }
    .cmx-strip-nav__inner { grid-template-columns: 1fr 1fr; }
    .cmx-strip-nav__all { display: none; }
    .cmx-strip-nav__link--next { grid-column: 2; }
}
