/* Page Builder 2.8 - 2.10: the presets of the landing blocks and of the product cards (Traffic Cones For Less).
   Every choice an editor makes in a block (kicker, heading style, accent phrase, second button, Block background, Space
   inside) is one class here: nobody types CSS. Loaded on the landing pages the builder draws
   (modules/Home_Builder/landing_body.tpl) and in the block previews of the admin (slot_native.tpl).
   Colors and fonts are the store's own tokens (css/basic/_tokens.scss), so another store's copy of this file shows that
   store's brand. Nothing here changes a block that uses none of these classes. */

/* ---- 2.10 the accent color of a page (Page settings). --hb-accent is set on the page's <main> by landing_body.tpl; with
   nothing chosen it is the store's own accent. Kickers, accent phrases and dividers read it. ---- */
:root {
	--hb-accent-green: #56A247;   /* the Cone Upcycling green */
}

/* ---- kicker, subtitle, accent phrase, banner heading (native.php hb_nb_head) ---- */
.landing .hb-kicker {
	font-family: var(--ff-condensed);
	font-weight: 700;
	font-size: .95rem;
	line-height: 1.3;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-align: center;
	color: var(--hb-accent, var(--clr-orange-500));
	margin: 1rem 0 .35rem;
}
.landing .hb-kicker + :is(h2, h3) {
	margin-top: 0;
}
.landing .hb-sub {
	font-size: clamp(1.05rem, .95rem + .4vi, 1.3rem);
	line-height: 1.45;
	text-align: center;
	color: var(--gray-7, #4b5563);
	margin: 0 0 1rem;
}
.landing .hb-accent {
	color: var(--hb-accent, var(--clr-orange-500));
}
.landing :is(h2, h3).hb-title-banner {
	font-family: var(--ff-condensed);
	font-weight: 800;
	font-size: clamp(2.1rem, 4.6vw, 3.4rem);
	line-height: 1.08;
	text-transform: uppercase;
	color: var(--brand-9);
	margin-block: .25rem .8rem;
}
/* Text + image: its text column is left aligned */
.landing .split-content :is(.hb-kicker, .hb-sub) {
	text-align: left;
}
.landing .split-content .hb-kicker {
	margin-top: 0;
}

/* ---- two buttons side by side; the secondary button is the outlined one ---- */
.landing .hb-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	justify-content: center;
	margin: 1.25rem 0 30px;
}
.landing .split-content .hb-btns {
	justify-content: flex-start;
	margin-bottom: 0;
}
.landing .btn.hb-btn2 {
	--_btn-color: #fff;
	--_text: var(--brand-8);
	--_border: var(--brand-8);
	background-color: #fff;
	color: var(--brand-8);
	border-color: var(--brand-8);
}
.landing .btn.hb-btn2:hover,
.landing .btn.hb-btn2:focus-visible {
	background-color: var(--brand-1);
}
/* phones: the two buttons one under the other, the same width */
@media (max-width: 480px) {
	.landing .hb-btns .btn {
		flex: 1 1 100%;
	}
}

/* ---- Block background (Style & visibility): a band from one page edge to the other, whatever width the block has.
   The band is painted outside the block's own box with a border image, so the layout of the block does not change and
   the page gets no sideways scroll. ---- */
main.landing section.hb-bg {
	--hb-bg: #fff;
	background: var(--hb-bg);
	border-image: conic-gradient(var(--hb-bg) 0 0) fill 0 / 0 / 0 100vw;
}
main.landing section.hb-bg-light-blue {
	--hb-bg: var(--bg-light-blue, #e8f0fe);
}
main.landing section.hb-bg-gray {
	--hb-bg: #f6f6f9;
}
main.landing section.hb-bg-navy {
	--hb-bg: var(--brand-9, #0b1f4b);
}
main.landing section.hb-bg-gradient {
	background: linear-gradient(#110f24 0%, #05050b 100%);
	border-image: linear-gradient(#110f24 0%, #05050b 100%) fill 0 / 0 / 0 100vw;
}
/* the Text block is a light blue card by design: on a chosen background its text sits right on the band */
main.landing section.lp-text-block.hb-bg .wrapper {
	background: none;
	box-shadow: none;
	border-radius: 0;
}

/* white text on the dark bands; cards and boxes keep their own colors */
main.landing section.hb-tone-light,
main.landing section.hb-tone-light.lp-text-block .wrapper {
	color: #fff;
}
main.landing section.hb-tone-light :is(h2, h3),
main.landing section.hb-tone-light :is(h2, h3).hb-title-banner,
main.landing section.hb-tone-light .lp-card-icon .lp-card-title {
	color: #fff;
}
main.landing section.hb-tone-light .hb-sub {
	color: rgb(255 255 255 / .86);
}
main.landing section.hb-tone-light :is(p, li) a:not(.btn) {
	color: #fff;
	text-decoration: underline;
}
main.landing section.hb-tone-light :is(.lp-card, .metrics-item, .testimonials-block) {
	color: var(--gray-9, #15191d);
}
/* the FAQ list sits right on the band: its questions, answers and icons turn white */
main.landing section.hb-tone-light .faq-list :is(.faq-list_header, .faq-list_header div, .faq-list_header i, .faq-list_body, .faq-list_body p, .faq-list_body li) {
	color: #fff;
}
main.landing section.hb-tone-light .btn.hb-btn2 {
	--_btn-color: transparent;
	--_text: #fff;
	--_border: #fff;
	background-color: transparent;
	color: #fff;
	border-color: #fff;
}
main.landing section.hb-tone-light .btn.hb-btn2:hover,
main.landing section.hb-tone-light .btn.hb-btn2:focus-visible {
	background-color: rgb(255 255 255 / .14);
}

/* ---- Space inside (Style & visibility): the room above and below the block's content, inside its background ---- */
main.landing section.hb-sp-tight {
	padding-block: clamp(.75rem, 2vw, 1.25rem);
}
main.landing section.hb-sp-normal {
	padding-block: clamp(2rem, 5vw, 3.5rem);
}
main.landing section.hb-sp-roomy {
	padding-block: clamp(3rem, 8vw, 6rem);
}
/* the preset is the whole room: the Text block's own outer margin and the gaps before its first and after its last
   line go (the single button row carries its 30 px in the markup, hence !important), and a heading that opens a block
   starts at the top */
main.landing section.lp-text-block[class*="hb-sp-"] .wrapper {
	margin-block: 0;
}
main.landing section.lp-text-block[class*="hb-sp-"] .wrapper > :first-child,
main.landing section[class*="hb-sp-"] > :is(h2, h3):first-child {
	margin-top: 0;
}
main.landing section.lp-text-block[class*="hb-sp-"] .wrapper > :last-child {
	margin-bottom: 0 !important;
}

/* ---- Metrics: when a number is long (165,000 lb) the whole row gets a smaller size, and a number stays on one line ---- */
.landing .metrics-wrapper.hb-num-md .metrics-item {
	font-size: clamp(1.75rem, 1.45rem + 1.2vi, 2.5rem);
}
.landing .metrics-wrapper.hb-num-sm .metrics-item {
	font-size: clamp(1.375rem, 1.15rem + .9vi, 2rem);
}
.landing .metrics-wrapper:is(.hb-num-md, .hb-num-sm) .metrics-item > div:first-child {
	white-space: nowrap;
}

/* ---- 2.9 Product cards of a product slot (sources.php hb_pc_view). The card is the store's own (.grid-item of
   pages/_product-listing.scss): these classes sit on the slot's box and switch parts of it. A card is a subgrid over the
   rows of its line, so the number of rows it takes (--hb-pc-span) follows what is shown. ---- */
.landing .hb-pc .grid-wrapper {
	--grid-row-span: var(--hb-pc-span, span 7);
}
.landing .hb-pc-outline .grid-item {
	box-shadow: none;
	border: 1px solid var(--gray-3, #cfd6de);
}
.landing .hb-pc-flat .grid-item {
	box-shadow: none;
	background: transparent;
	padding-inline: 0;
}
.landing :is(.hb-pc-outline, .hb-pc-flat) .grid-item::after {
	display: none;
}
.landing .hb-pc-noimg .products-image,
.landing .hb-pc-noname .products-title,
.landing .hb-pc-noprice .products-price,
.landing .hb-pc-noopt .products-options,
.landing .hb-pc-nometa :is(.jbc-listing, .products-sku, .products-stock),
.landing .hb-pc-nobadges .products-badges,
.landing .hb-pc-only .grid-item > :not(.products-image) {
	display: none;
}
/* Picture: cropped to a square (the whole card width) */
.landing .hb-pc-sq .grid-item .products-image {
	place-self: stretch;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: calc(var(--grid-item-border-radius) - .25rem);
}
.landing .hb-pc-sq .grid-item .products-image :is(picture, img) {
	display: block;
	width: 100%;
	height: 100%;
}
.landing .hb-pc-sq .grid-item .products-image img {
	object-fit: cover;
}
/* Picture only: the picture fills the card */
.landing .hb-pc-only .grid-item {
	padding: 0;
	overflow: hidden;
}
.landing .hb-pc-only .grid-item .products-image {
	place-self: stretch;
}
.landing .hb-pc-only .grid-item .products-image :is(picture, img):not(.js-image-hover) {
	display: block;
	width: 100%;
	height: auto;
}
/* Product name: condensed bold, as the product cards of the hand-made pages */
.landing .hb-pc-name-bold .grid-item .products-title {
	font-family: var(--ff-condensed);
	font-weight: 800;
	font-size: 1.3rem;
	line-height: 1.15;
	color: var(--brand-9);
}
.landing .hb-pc .hb-pc-desc {
	font-size: .95rem;
	line-height: 1.5;
	color: var(--gray-8, #2b3138);
	margin: 0;
}
/* Badge: a small pill in the top left corner of the card */
.landing .hb-pc .hb-pc-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 3px 12px;
	border-radius: 2rem;
	font-family: var(--ff-condensed);
	font-weight: 700;
	font-size: .875rem;
	line-height: 1.4;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
	background: var(--brand-9, #0b1f4b);
	pointer-events: none;
}
/* Button: at the bottom of the card */
.landing .hb-pc .hb-pc-btn {
	align-self: end;
	justify-self: start;
	margin-top: .35rem;
	text-align: center;
	box-sizing: border-box;
}
.landing .hb-pc-btn-full .hb-pc-btn {
	justify-self: stretch;
	width: 100%;
}
/* in a carousel the cards are a flex line, not the rows of a grid: a card stacks its parts itself and its button keeps
   the bottom, so the buttons of the line stay level when one name takes two lines */
.landing .hb-pc.hb-car .grid-item {
	display: flex;
	flex-direction: column;
	gap: .375rem;
}
.landing .hb-pc.hb-car .grid-item .products-image {
	align-self: center;
}
.landing .hb-pc.hb-car:is(.hb-pc-sq, .hb-pc-only) .grid-item .products-image {
	align-self: stretch;
}
.landing .hb-pc.hb-car .grid-item .hb-pc-btn {
	margin-top: auto;
	align-self: flex-start;
}
.landing .hb-pc.hb-car.hb-pc-btn-full .grid-item .hb-pc-btn {
	align-self: stretch;
}

/* ---- 2.10 Divider (Style & visibility): a thin line in the page's accent color at the bottom of a block or a section,
   from one page edge to the other whatever width the block has. The line is an element of its own (several designs use
   the section's ::after); its wide shadow, cut to the line's height, carries it to the page edges with no sideways scroll. ---- */
.landing .hb-has-div {
	position: relative;
}
.landing .hb-divider {
	position: absolute;
	inset: auto 0 0 0;
	height: 4px;
	z-index: 1;
	background: var(--hb-accent, var(--clr-orange-500));
	box-shadow: 0 0 0 100vmax var(--hb-accent, var(--clr-orange-500));
	clip-path: inset(0 -100vmax);
	pointer-events: none;
}

/* ---- 2.10 Entrance animation (Style & visibility) of a landing block, once, when it reaches the screen. landing_body.tpl
   puts hb-rv on <html> (only with a script, an observer and no "reduce motion"), then hb-in on the block. Fade up: the
   parts of the block rise together. One after another: its items come in one by one; a block with no items fades up.
   The other sections of a landing page (a Row, Products) take the same two: their columns or product cards are the items.
   The store's own scale-and-blur effect (.st-animation) steps aside in a block that has one of these. ---- */
@media (prefers-reduced-motion: no-preference) {
	html.hb-rv .landing section.hb-an .st-animation,
	html.hb-rv .landing section.hb-an .st-animation img {
		scale: 1;
		filter: none;
		opacity: 1;
	}
	html.hb-rv .landing section.hb-an-fade > :not(.hb-divider),
	html.hb-rv .landing section.hb-an-stagger :is(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .lp-wrapper-gallery > .client, .option-grid > *, .split-content > *, .lp-text-block > .wrapper > *, .hb-slot:not(:has(.grid-item))),
	html.hb-rv .landing section.hb-an-stagger:not(:has(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .option-grid, .split-content, .hb-slot)):not(.lp-wrapper-gallery, .lp-text-block) > :not(.hb-divider) {
		opacity: 0;
		translate: 0 26px;
		transition: opacity .6s ease, translate .6s cubic-bezier(.2, .7, .2, 1);
	}
	html.hb-rv .landing section.hb-an-fade.hb-in > :not(.hb-divider),
	html.hb-rv .landing section.hb-an-stagger.hb-in :is(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .lp-wrapper-gallery > .client, .option-grid > *, .split-content > *, .lp-text-block > .wrapper > *, .hb-slot:not(:has(.grid-item))),
	html.hb-rv .landing section.hb-an-stagger.hb-in:not(:has(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .option-grid, .split-content, .hb-slot)):not(.lp-wrapper-gallery, .lp-text-block) > :not(.hb-divider) {
		opacity: 1;
		translate: 0 0;
	}
	html.hb-rv .landing section.hb-an-stagger :is(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .client, .option-grid > *, .split-content > *, .wrapper > *, .hb-slot):nth-child(2) { transition-delay: .09s; }
	html.hb-rv .landing section.hb-an-stagger :is(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .client, .option-grid > *, .split-content > *, .wrapper > *, .hb-slot):nth-child(3) { transition-delay: .18s; }
	html.hb-rv .landing section.hb-an-stagger :is(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .client, .option-grid > *, .split-content > *, .wrapper > *, .hb-slot):nth-child(4) { transition-delay: .27s; }
	html.hb-rv .landing section.hb-an-stagger :is(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .client, .option-grid > *, .split-content > *, .wrapper > *, .hb-slot):nth-child(5) { transition-delay: .36s; }
	html.hb-rv .landing section.hb-an-stagger :is(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .client, .option-grid > *, .split-content > *, .wrapper > *, .hb-slot):nth-child(6) { transition-delay: .45s; }
	html.hb-rv .landing section.hb-an-stagger :is(.lp-card, .lp-card-icon, .metrics-item, .grid-item, .faq-list_item, .client, .option-grid > *, .split-content > *, .wrapper > *, .hb-slot):nth-child(n + 7) { transition-delay: .54s; }
}
