/* Crumb homepage (templates/home-crumb.php). Loaded on that page only. */

.crumb-home {
    --ch-pad: clamp(16px, 4vw, 48px);
    --ch-soft: var(--global-palette5);
    --ch-line: #e5ded6;
    display: block;
    color: var(--global-palette3);
}
.crumb-home h2,
.crumb-home h3 {
    font-family: var(--crumb-serif);
    font-weight: 400;
    text-wrap: balance;
}
.ch-wrap {
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: var(--ch-pad);
}

/* Page title */
.ch-intro {
    padding: 1.6rem 0 1.5rem;
    background: var(--global-palette8);
}
.ch-intro h1 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.15;
    color: var(--global-palette3);
}
.ch-intro p {
    max-width: 44rem;
    margin: 0;
    font-size: 1.02rem;
    color: var(--ch-soft);
}

/* Recipe of the week, pinned beside the photo */
.ch-hero {
    position: relative;
    min-height: 560px;
    display: grid;
    align-items: center;
    justify-items: end;
    padding: var(--ch-pad);
}
.ch-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 20% 50%;
}
.ch-card {
    position: relative;
    max-width: 340px;
    margin-right: clamp(0px, 4vw, 64px);
    padding: 28px 28px 24px;
    background: var(--global-palette8);
    border-radius: 4px;
    transform: rotate(-1.2deg);
    box-shadow: 0 20px 40px -18px rgba(43, 23, 18, .55);
}
.ch-card::before {
    content: "";
    position: absolute;
    top: -11px;
    left: 50%;
    width: 84px;
    height: 22px;
    margin-left: -42px;
    background: var(--crumb-pistachio);
    opacity: .9;
    transform: rotate(2deg);
}
.ch-card__kicker {
    margin: 0;
    color: var(--global-palette1);
    font-size: 14px;
    font-weight: 600;
}
.ch-card h2 {
    margin: 6px 0 10px;
    font-size: 38px;
    line-height: 1.05;
}
.ch-card p {
    margin: 0 0 16px;
    font-size: 16px;
}
.ch-card__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 18px;
    padding-block: 12px;
    border-block: 1px dashed var(--ch-line);
    font-variant-numeric: tabular-nums;
}
.ch-card__facts dt {
    font-size: 12px;
    color: var(--ch-soft);
}
.ch-card__facts dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.ch-btn {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 4px;
    background: var(--global-palette3);
    color: var(--global-palette8);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}
.ch-btn:hover,
.ch-btn:focus-visible {
    background: var(--global-palette1);
    color: var(--global-palette8);
}

/* Pantry */
.ch-pantry__top {
    background: var(--global-palette3);
    color: var(--global-palette8);
    padding-block: 44px 32px;
}
.ch-pantry__top h2 {
    margin: 0 0 12px;
    max-width: 18ch;
    color: var(--global-palette8);
    font-size: clamp(30px, 4.6vw, 48px);
    line-height: 1.05;
}
.ch-pantry__top p {
    margin: 0 0 18px;
    max-width: 55ch;
    color: #d9cbc2;
    font-size: 16px;
}
.ch-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.crumb-home .ch-chip {
    padding: 8px 14px;
    border: 1.5px solid var(--crumb-butter);
    border-radius: 999px;
    background: transparent;
    color: var(--crumb-butter);
    font: 600 15px/1.2 var(--global-body-font-family);
    cursor: pointer;
}
.crumb-home .ch-chip[aria-pressed="true"] {
    background: var(--crumb-butter);
    color: var(--global-palette3);
}
.crumb-home .ch-chip:hover {
    border-color: var(--global-palette8);
}
.ch-status {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 !important;
}
.crumb-home .ch-clear {
    padding: 0;
    border: 0;
    background: none;
    color: var(--crumb-butter);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.ch-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 32px 0 44px;
    list-style: none;
}
.ch-item {
    display: grid;
    gap: 10px;
    align-content: start;
}
.ch-item__ph {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    max-width: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: var(--crumb-pistachio-soft);
    color: var(--ch-soft);
    font-size: 13px;
    text-decoration: none;
}
.ch-item__ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ch-item h3 {
    margin: 0;
    font-size: 21px;
    line-height: 1.2;
}
.ch-item h3 a {
    color: inherit;
    text-decoration: none;
}
.ch-item h3 a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ch-need {
    margin: 4px 0 6px;
    color: var(--ch-soft);
    font-size: 14px;
}
.ch-need b {
    color: var(--global-palette1);
}
.ch-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}
.ch-tags span {
    padding: 2px 8px;
    border-radius: 3px;
    background: #f1ede8;
    font-size: 13px;
}
.ch-tags span.is-have {
    background: var(--crumb-pistachio);
}

/* Stage photos */
.ch-stages {
    padding-block: 40px 48px;
    border-top: 1px solid var(--ch-line);
}
.ch-stages h2 {
    margin: 0 0 18px;
    font-size: clamp(24px, 3vw, 30px);
}
.ch-stages__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.ch-stages figure {
    margin: 0;
}
.ch-stages img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}
.ch-stages figcaption {
    margin-top: 8px;
    font-size: 15px;
}
.ch-stages__from {
    margin: 16px 0 0;
    color: var(--ch-soft);
    font-size: 15px;
}

/* Recipe box */
.ch-box {
    background: var(--crumb-pistachio);
    padding-block: 44px;
}
.ch-box h2 {
    margin: 0 0 22px;
    font-size: clamp(26px, 3.4vw, 34px);
}
.ch-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ch-card-index {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 3px;
    background-color: var(--global-palette8);
    box-shadow: 0 2px 0 rgba(43, 23, 18, .12);
    color: var(--global-palette3);
    text-decoration: none;
}
.ch-card-index__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.ch-card-index__body {
    display: grid;
    flex: 1;
    gap: 6px;
    align-content: start;
    padding: 14px 16px 16px;
    background-image:
        linear-gradient(var(--global-palette8) 46px, var(--global-palette1) 46px, var(--global-palette1) 47.5px, transparent 47.5px),
        repeating-linear-gradient(transparent 0 23px, #dbe6f0 23px 24px);
    background-position: 0 0, 0 8px;
}
.ch-card-index__line {
    display: -webkit-box;
    height: 32px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--ch-soft);
    font-size: 12px;
    line-height: 16px;
}
.ch-card-index b {
    padding-top: 6px;
    font: 400 21px/1.15 var(--crumb-serif);
}
.ch-card-index:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(43, 23, 18, .12);
}
@media (prefers-reduced-motion: no-preference) {
    .ch-card-index {
        transition: transform .15s, box-shadow .15s;
    }
}

@media (max-width: 860px) {
    .ch-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .ch-hero {
        display: block;
        min-height: 0;
        padding: 0;
    }
    .ch-hero__img {
        position: static;
        height: auto;
        aspect-ratio: 16 / 9;
        max-width: 100%;
    }
    .ch-card {
        max-width: none;
        margin: -28px 16px 24px;
        transform: rotate(-.8deg);
    }
    .ch-card h2 {
        font-size: 32px;
    }
    .ch-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
    .ch-item {
        grid-template-columns: 96px minmax(0, 1fr);
        column-gap: 14px;
    }
    .ch-item__ph {
        aspect-ratio: 1;
        font-size: 11px;
        text-align: center;
    }
    .ch-item h3 {
        font-size: 18px;
    }
    .ch-stages__row {
        gap: 10px;
    }
    .ch-stages figcaption {
        font-size: 12px;
    }
}
