/* Family Story 2 — pine-deep band: polaroid + numbered family list.
   Tokens only. Ported from files2/Kåbdalis2.html .band--family
   + .family-grid + .fam-list + .num. */

/* Outer band: alignment-controlled. Owns the pine-deep background,
   vertical breathing room, and the band radius — which means at
   align: full the coloured band genuinely runs edge-to-edge.
   Inner __inner wrapper centres the content grid at --maxw. */
.kab2-fam{
    background: var(--pine-deep);
    color: color-mix(in srgb, var(--surface) 92%, var(--pine) 8%);
    border-radius: var(--radius);
    padding-block: var(--band-pad);
    padding-inline: var(--band-pad-x);
}
.kab2-fam__inner{
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: clamp(36px, 5vw, 76px);
    align-items: center;
    max-width: var(--maxw);
    margin-inline: auto;
}
.kab2-fam--rev .kab2-fam__photo{ order: 2; }

/* Eyebrow override on the dark band — keep accent token but lighten it
   for contrast against pine-deep. */
.kab2-fam__eyebrow{
    color: color-mix(in srgb, var(--ok) 60%, var(--surface) 40%);
}
.kab2-fam__eyebrow::before{
    background: color-mix(in srgb, var(--ok) 60%, var(--surface) 40%);
}

.kab2-fam__title{
    font-size: clamp(34px, 4.2vw, 54px);
    margin: 16px 0 18px;
    color: var(--surface);
    line-height: var(--display-lh, 1.05);
    letter-spacing: var(--display-ls, -0.02em);
}
.kab2-fam__lead{
    color: color-mix(in srgb, var(--surface) 78%, var(--pine) 22%);
    max-width: 46ch;
    font-size: clamp(16.5px, 1.4vw, 19px);
    margin: 0;
}

/* ── Polaroid override on dark band ─────────────────────────────── */
.kab2-fam__photo{
    max-width: 420px;
    justify-self: start;
    transform: rotate(-2.4deg);
    transition: transform .4s var(--ease);
    margin: 0;
}
.kab2-fam__photo:hover{ transform: rotate(-0.6deg) translateY(-6px); }
.kab2-fam--rev .kab2-fam__photo{ justify-self: end; }

.kab2-fam__img-empty{
    aspect-ratio: 4 / 4.6;
    display: grid;
    place-items: center;
    background: var(--surface2);
    border-radius: var(--radius-sm);
}

/* ── Numbered list ──────────────────────────────────────────────── */
.kab2-fam__list{
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.kab2-fam__item{
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface) 6%, transparent);
    transition: background .25s var(--ease), transform .25s var(--ease);
}
.kab2-fam__item:hover{
    background: color-mix(in srgb, var(--surface) 11%, transparent);
    transform: translateX(6px);
}
.kab2-fam__num{
    font-size: 1.625rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--ok) 60%, var(--surface) 40%);
    line-height: 1.1;
    flex: none;
    width: 30px;
}
.kab2-fam__body{ min-width: 0; flex: 1; }
.kab2-fam__body h3{
    font-size: 1.15625rem;
    letter-spacing: -0.01em;
    margin: 0 0 3px;
    color: var(--surface);
}
.kab2-fam__body p{
    font-size: .9375rem;
    color: color-mix(in srgb, var(--surface) 70%, var(--pine) 30%);
    line-height: 1.5;
    margin: 0;
}

/* ── Editor-only controls ───────────────────────────────────────── */
.kab2-fam__ctrls{
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    flex: none;
}
.kab2-fam-add{ margin: 14px 0 0; align-self: flex-start; }

/* Move/remove mini-buttons (editor only; this file is also the editorStyle).
   Scoped to the controls cluster so it can't leak onto the frontend, and
   given a legible light chip look over the dark pine band. */
.kab2-fam__ctrls .kabdalis-rm-icon-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--line, #e4ded2);
    background: var(--surface, #fffdf9);
    color: var(--ink, #25211b);
    border-radius: 4px;
    cursor: pointer;
    line-height: 0;
}
.kab2-fam__ctrls .kabdalis-rm-icon-btn:hover:not(:disabled){ background: var(--surface2, #f5f1ea); }
.kab2-fam__ctrls .kabdalis-rm-icon-btn:disabled{ opacity: .3; cursor: not-allowed; }
.kab2-fam__ctrls .kabdalis-rm-icon-btn.is-destructive{ color: var(--accent, #9c3a52); }
.kab2-fam__ctrls .kabdalis-rm-icon-btn.is-destructive:hover:not(:disabled){
    background: var(--accent, #9c3a52); color: var(--on-accent, #fff); border-color: var(--accent, #9c3a52);
}

/* The polaroid figcaption ends up dark on a dark background unless we
   re-state it on this band. Theme already styles .b-polaroid__cap, but
   the family band needs the muted variant. */
.kab2-fam .b-polaroid__cap{
    color: color-mix(in srgb, var(--ink) 65%, var(--ink-soft) 35%);
}

@media (max-width: 880px){
    .kab2-fam__inner{ grid-template-columns: 1fr; }
    .kab2-fam__photo,
    .kab2-fam--rev .kab2-fam__photo{
        max-width: 380px;
        margin-inline: auto;
        justify-self: center;
    }
}
