/* S13 Bento grid (#157) — tools/demo/templates/sections/bento-grid.liquid + bento.js. Square cells on two rows, the grid runs in columns;
   each card sets its scheme (Concept's own --color-* so its classes — price, links — follow) and its span (--w × --h). */
.ext-bento { --bento-gap: var(--sp-4); --bento-cell: clamp(240px, 21vw, 330px); --bento-pad: clamp(20px, 1.8vw, 28px); --bento-accent: 190 242 100; }
.ext-bento__viewport { overflow: hidden; }
.ext-bento__track { display: grid; grid-auto-flow: column dense; grid-template-rows: repeat(2, var(--bento-cell)); grid-auto-columns: var(--bento-cell);
  gap: var(--bento-gap); width: max-content; will-change: transform; }
/* Artem 2026-10-29: the subheading closer to the heading (16 → 12), the grid further from it (32 → 40 phones, 48 desktop) */
.ext-bento .title-wrapper { margin-block-end: var(--sp-10); }
.ext-bento .title-wrapper > .grid { row-gap: var(--sp-3); }
@media screen and (min-width: 1024px) { .ext-bento .title-wrapper { margin-block-end: var(--sp-12); } }

.ext-bento__card { position: relative; grid-column: span var(--w); grid-row: span var(--h); display: flex; flex-direction: column; justify-content: space-between;
  gap: var(--sp-3); padding: var(--bento-pad); border-radius: var(--rounded-block); overflow: hidden; isolation: isolate;
  background: rgb(var(--color-background)); color: rgb(var(--color-foreground)); }
.ext-bento__card[data-scheme="graphite"] { --color-background: 24 25 29; --color-foreground: 245 245 244; }
.ext-bento__card[data-scheme="ink"] { --color-background: 9 9 11; --color-foreground: 245 245 244; box-shadow: inset 0 0 0 1px rgb(245 245 244 / .08); }
.ext-bento__card[data-scheme="lime"] { --color-background: 190 242 100; --color-foreground: 9 9 11; }
.ext-bento__card[data-scheme="sand"] { --color-background: 230 225 212; --color-foreground: 9 9 11; }
.ext-bento__card[data-scheme="clay"] { --color-background: 181 105 75; --color-foreground: 245 245 244; }
.ext-bento__card[data-scheme="sand-warm"] { --color-background: 212 192 163; --color-foreground: 9 9 11; } /* DS sand-warm #d4c0a3 (Artem 2026-10-29: the site's beige) */
.ext-bento__card[data-scheme="slate"] { --color-background: 94 109 126; --color-foreground: 245 245 244; }
.ext-bento__card[data-scheme="photo"] { --color-background: 24 25 29; --color-foreground: 245 245 244; }

.ext-bento__body { display: grid; gap: var(--sp-2); z-index: 1; }
.ext-bento__body--end { margin-block-start: auto; }
.ext-bento__eyebrow { font-size: var(--text-sm); opacity: .7; }
.ext-bento__heading { font-size: clamp(22px, 1.9vw, 30px); line-height: 1.05; letter-spacing: -0.03em; }
.ext-bento__heading--lg { font-size: clamp(32px, 3.2vw, 52px); }
.ext-bento__text { font-size: var(--text-sm); line-height: 1.4; opacity: .75; max-width: 34ch; }
.ext-bento__outline { color: transparent; -webkit-text-stroke: max(1px, .03em) rgb(var(--color-foreground)); } /* currentColor would be the transparent fill */
.ext-bento__number { font-size: clamp(64px, 6.4vw, 104px); line-height: .9; letter-spacing: -0.05em; display: flex; align-items: baseline; gap: .08em; }
.ext-bento__suffix { font-size: .38em; letter-spacing: -0.02em; }
.ext-bento__cta { color: inherit; justify-self: start; }
.ext-bento__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgb(var(--color-foreground) / .12); }

/* Feature: the packshot sits in the graphite card (its own ground) — bottom right, large (Concept's .media is position: relative — beat it) */
.ext-bento__card .ext-bento__cutout { position: absolute; right: 0; bottom: 0; width: 72%; height: 92%; z-index: 0; }
.ext-bento__cutout img { width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }
.ext-bento__card--feature[data-scheme="graphite"] .ext-bento__cutout { -webkit-mask-image: linear-gradient(to left, #000 70%, transparent); mask-image: linear-gradient(to left, #000 70%, transparent); }

/* Image: a full photo, the text on a foot gradient */
.ext-bento__card .ext-bento__photo { position: absolute; inset: 0; z-index: 0; }
.ext-bento__photo img { width: 100%; height: 100%; object-fit: cover; }
.ext-bento__card--image::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgb(9 9 11 / 0) 45%, rgb(9 9 11 / .55)); }
.ext-bento__arrow { position: absolute; right: var(--bento-pad); bottom: var(--bento-pad); z-index: 1; }
a.ext-bento__link { display: block; inset: 0; } /* Concept hides an empty <a> (a:empty, as #141 / #142) and has no inset-0: the card's link was 0 × 0 */
/* Statement (Artem 2026-10-29, after Apple's «2x more / Active Noise Cancellation»): a cinematic photo, two centred lines over a soft dark oval
   — the first in the card's foreground, the accent lime */
.ext-bento__card--statement { justify-content: center; align-items: center; text-align: center; }
.ext-bento__card--statement::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 46% 52% at 50% 50%, rgb(9 9 11 / .62), rgb(9 9 11 / .28) 70%, rgb(9 9 11 / 0)); }
.ext-bento__statement { z-index: 1; font-size: clamp(26px, 2.3vw, 38px); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.ext-bento__statement span { display: block; color: rgb(var(--bento-accent)); }
.ext-bento__card--statement:has(.ext-bento__statement--bottom) { justify-content: flex-end; }
.ext-bento__card--statement:has(.ext-bento__statement--bottom)::after { background: linear-gradient(180deg, rgb(9 9 11 / 0) 52%, rgb(9 9 11 / .7)); }
/* the photo zooms in a touch on hover, as the Bestseller's bottle (Artem 2026-10-29); Concept's zoom-out on view moves the <picture>, this the <img> */
.ext-bento__card--statement .ext-bento__photo img { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.ext-bento__card--statement:hover .ext-bento__photo img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .ext-bento__card--statement .ext-bento__photo img { transition: none; } }

/* Product: the packshot on its own ground, name + price, a round add button */
.ext-bento__card--product { padding: 0; gap: 0; }
.ext-bento__shot { flex: 1; min-height: 0; }
.ext-bento__shot img { width: 100%; height: 100%; object-fit: contain; }
.ext-bento__buy { padding: 0 var(--bento-pad) var(--bento-pad); }
.ext-bento__name { color: inherit; font-size: var(--text-sm); justify-items: start; }
.ext-bento__name .price, .ext-bento__name .price * { justify-content: flex-start; align-items: flex-start; text-align: left; }
/* the + is Concept's round secondary button (hover-button), as our other round ones: the card's foreground circle; on its hover Concept's fill
   (the button colour, lime) rises from below and the plus takes the button text (ink); while adding, Concept's loader; then ✓ for a moment */
.ext-bento__add.button { flex: none; width: 40px; height: 40px; min-width: 0; padding: 0; border: 0; --border-opacity: 0; border-radius: 50%;
  background: rgb(var(--color-foreground)); color: rgb(var(--color-background)); backdrop-filter: none; -webkit-backdrop-filter: none; transition: color .3s; }
.ext-bento__add .btn-text { display: inline-flex; }
.ext-bento__add .icon-quiz-check, .ext-bento__add[data-added] .icon-plus { display: none; }
.ext-bento__add[data-added] .icon-quiz-check { display: block; }

/* Pinned (desktop): the pin sticks under the header (bento.js sets --ext-bento-top and the run); the track slides by the page scroll */
@media screen and (min-width: 1024px) {
  .ext-bento[data-layout="pinned"][data-ready] { height: calc(var(--ext-bento-pin, 0px) + var(--ext-bento-run, 0px)); }
  .ext-bento[data-layout="pinned"] .ext-bento__pin { position: sticky; top: var(--ext-bento-top, 100px); }
  .ext-bento[data-layout="grid"] .ext-bento__viewport { overflow-x: auto; scrollbar-width: none; }
}
/* Phones and tablets: no pin — a swipeable strip, its cells a little smaller */
@media screen and (max-width: 1023px) {
  .ext-bento { --bento-cell: clamp(160px, 42vw, 240px); --bento-gap: var(--sp-2d5); --bento-pad: var(--sp-4); }
  .ext-bento__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--page-padding, 20px); scrollbar-width: none; overscroll-behavior-x: contain; }
  .ext-bento__card { scroll-snap-align: start; }
  .ext-bento__number { font-size: clamp(44px, 12vw, 64px); }
  .ext-bento__heading--lg { font-size: clamp(26px, 7vw, 34px); }
  .ext-bento__heading, .ext-bento__statement { font-size: clamp(18px, 5vw, 22px); }
}
.ext-bento__viewport::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .ext-bento__track { will-change: auto; } }

/* #157 round 2 (Artem 2026-10-28: «скучновато, пустовато»; no outline inside the cards — the section title keeps it) */
.ext-bento__heading--md { font-size: clamp(26px, 2.3vw, 38px); }
.ext-bento__body--top { gap: var(--sp-3); }
.ext-bento__card .ext-bento__badge { position: absolute; top: var(--bento-pad); left: var(--bento-pad); z-index: 2; padding: 4px 10px; border-radius: 99px;
  background: rgb(190 242 100); color: rgb(9 9 11); font-size: 12px; font-weight: 600; line-height: 1.3; }
.ext-bento__spec { font-size: 12px; opacity: .65; }
.ext-bento__stars { display: flex; gap: 3px; }
.ext-bento__stars svg { width: 16px; height: 16px; fill: currentColor; }
.ext-bento__stars .is-off { opacity: .25; }
.ext-bento__faces { height: 36px; width: auto; flex: none; }
.ext-bento__chip { padding: 6px 12px; border-radius: 99px; border: 1px solid rgb(var(--color-foreground) / .25); font-size: 13px; line-height: 1.2; }
.ext-bento__from { font-size: 14px; opacity: .85; }
.ext-bento__btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 99px; background: rgb(var(--color-foreground));
  color: rgb(var(--color-background)); font-size: 14px; font-weight: 600; line-height: 1; transition: transform var(--animation-primary, .3s ease); }
.ext-bento__btn:hover { transform: translateX(3px); }
.ext-bento__chips { margin-block-end: var(--sp-4); }
/* Stat columns (Artem 2026-10-29, after «Sales Analytics»): the figure on top, a bigger one than the rating's, then one column per value,
   as tall as its value; the card's own value in the foreground with the lime chip over it; they grow up when the card comes into view */
.ext-bento__card:has(.ext-bento__cols), .ext-bento__card:has(.ext-bento__road) { gap: var(--sp-2); }
.ext-bento__body--figure { margin-block-start: var(--sp-2); gap: var(--sp-1); }
.ext-bento__body--figure .ext-bento__number { font-size: clamp(56px, 5.6vw, 92px); }
.ext-bento__cols { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: clamp(6px, .7vw, 10px); } /* the chip floats over the taller columns, as on the mock */
.ext-bento__col { display: grid; grid-template-rows: 1fr auto; gap: 6px; min-height: 0; }
.ext-bento__col i { position: relative; align-self: end; height: 0; border-radius: clamp(6px, .8vw, 12px); background: rgb(var(--color-foreground) / .14);
  font-style: normal; transition: height .9s cubic-bezier(.2, .7, .2, 1) calc(var(--i) * .08s + .1s); }
.ext-bento__col.is-on i { z-index: 1; background: rgb(var(--color-foreground)); } /* its chip over the next column */
.ext-bento__col small { font-size: 12px; line-height: 1; text-align: center; opacity: .6; }
.ext-bento__col.is-on small { opacity: 1; font-weight: 600; }
.ext-bento__card[data-in] .ext-bento__col i { height: calc(var(--v) / var(--max) * 100%); }
.ext-bento__chip-on { position: absolute; left: 50%; bottom: calc(100% + 8px); padding: 5px 10px; border-radius: 10px; background: rgb(var(--bento-accent)); color: rgb(9 9 11);
  font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; opacity: 0; transform: translate(-50%, 6px); transition: opacity .4s ease .9s, transform .4s ease .9s; }
.ext-bento__card[data-in] .ext-bento__chip-on { opacity: 1; transform: translate(-50%, 0); }
/* Note meter: the way to free shipping fills, the truck drives along it */
.ext-bento__meter { display: grid; gap: 10px; padding-top: 34px; }
.ext-bento__meter-track { position: relative; height: 6px; border-radius: 99px; background: rgb(var(--color-foreground) / .22); overflow: hidden; }
.ext-bento__meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: rgb(var(--color-foreground)); transition: width 1.4s cubic-bezier(.3, .6, .2, 1) .2s; }
.ext-bento__meter-truck { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 28px; height: 28px; transition: left 1.4s cubic-bezier(.3, .6, .2, 1) .2s; }
.ext-bento__meter-truck svg { width: 24px; height: 24px; }
.ext-bento__meter-mark { justify-self: end; font-size: 12px; opacity: .75; }
.ext-bento__card[data-in] .ext-bento__meter-fill { width: 100%; }
.ext-bento__card[data-in] .ext-bento__meter-truck { left: calc(100% - 28px); }
/* The road (Artem 2026-10-29, Free Shipping variant 2): the bar fills while the truck in its circle drives along it — facing the way it goes,
   its centre on the bar's centre line — to the last tick, then the lime chip comes in */
.ext-bento__road { --truck: 40px; --lift: 30px; margin-block-start: auto; padding-top: calc(var(--truck) / 2 + var(--lift)); }
.ext-bento__road-track { position: relative; display: block; height: 6px; border-radius: 99px; background: rgb(var(--color-foreground) / .18); overflow: hidden; }
.ext-bento__road-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: rgb(var(--color-foreground)); transition: width 1.4s cubic-bezier(.3, .6, .2, 1) .2s; }
.ext-bento__road-truck { position: absolute; left: 0; top: calc(var(--truck) / 2 + var(--lift) + 3px); width: var(--truck); height: var(--truck); transform: translateY(-50%);
  display: grid; place-items: center; border-radius: 50%; background: rgb(var(--color-foreground)); color: rgb(var(--color-background)); transition: left 1.4s cubic-bezier(.3, .6, .2, 1) .2s; }
.ext-bento__road-truck svg { width: 46%; height: 46%; stroke-width: .85; transform: scaleX(-1); } /* the icon faces left, it drives right; smaller and finer (Artem 2026-10-29) */
.ext-bento__road-chip { position: absolute; top: 0; right: calc(var(--truck) / 2); translate: 50% 0; padding: 5px 10px; border-radius: 10px;
  background: rgb(var(--bento-accent)); color: rgb(9 9 11); font-size: 12px; font-weight: 600; line-height: 1.2; opacity: 0; transform: translateY(6px); transition: opacity .4s ease 1.5s, transform .4s ease 1.5s; }
.ext-bento__road-ticks { display: flex; justify-content: space-between; margin-top: calc(var(--truck) / 2 + var(--tick-gap, 8px)); }
.ext-bento__road-ticks small { font-size: 12px; line-height: 1; opacity: .55; }
.ext-bento__road-ticks small.is-on { opacity: 1; font-weight: 600; }
.ext-bento__card[data-in] .ext-bento__road-fill { width: 100%; }
.ext-bento__card[data-in] .ext-bento__road-truck { left: calc(100% - var(--truck)); }
.ext-bento__card[data-in] .ext-bento__road-chip { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ext-bento__col i, .ext-bento__chip-on, .ext-bento__meter-fill, .ext-bento__meter-truck, .ext-bento__road-fill, .ext-bento__road-truck, .ext-bento__road-chip { transition: none; } }

/* the hero (Artem 2026-10-28): Concept's pieces — only the spacing and the quieter tones are ours */
.ext-bento__card--feature .ext-bento__body { gap: var(--sp-3); }
.ext-bento__card--feature .ext-bento__body--end { gap: var(--sp-4); justify-items: start; }
.ext-bento__lede { opacity: .8; max-width: 30ch; }
.ext-bento__eyebrow.subtext-md { opacity: .7; font-size: inherit; } /* the cards' label: Concept's subheading look (body, normal case) — a card label, not the section eyebrow (#200) */
.ext-bento__pill { padding: 8px 14px; border-radius: 99px; border: 1px solid rgb(var(--color-foreground) / .25); }
.ext-bento__card--feature .ext-bento__foot { margin-block-start: auto; z-index: 1; }

/* Product with its own picture (Artem 2026-10-28, the Bestseller): the picture fills the card — its ground is the card's graphite, so the bottle
   can slide in from the top-right corner when the card comes into view, and on hover it grows in from that corner (its top and right edges stay
   out of sight) */
.ext-bento__card .ext-bento__art { position: absolute; inset: 0; z-index: 0; }
.ext-bento__art img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: translate3d(14%, -14%, 0) rotate(-4deg); transform-origin: 100% 0;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1) .15s, opacity .6s ease .15s; }
.ext-bento__card[data-in] .ext-bento__art img { opacity: 1; transform: none; }
.ext-bento__card[data-in]:hover .ext-bento__art img { transform: scale(1.05); transition-delay: 0s; }
.ext-bento__art + .ext-bento__buy { margin-block-start: auto; }
@media (prefers-reduced-motion: reduce) { .ext-bento__art img { opacity: 1; transform: none; transition: none; } }
/* the columns on phones and tablets (the cell 163.8 on a phone) */
@media screen and (max-width: 1023px) {
  .ext-bento__body--figure { margin-block-start: 0; }
  .ext-bento__body--figure .ext-bento__number { font-size: clamp(34px, 10vw, 44px); }
  .ext-bento__col small { font-size: 10px; }
  .ext-bento__chip-on { font-size: 10px; padding: 3px 6px; }
  .ext-bento__road { --truck: 26px; --lift: 20px; --tick-gap: 5px; }
  .ext-bento__road-chip { font-size: 10px; padding: 3px 6px; }
  .ext-bento__road-ticks small { font-size: 10px; }
  /* the Bestseller on a phone (Artem 2026-10-29, variant 2): name + price only, a finer name and a 32 px + so the name keeps to two lines */
  .ext-bento__name { font-size: 13px; line-height: 1.25; }
  .ext-bento__add.button { width: 32px; height: 32px; }
}
