/*
Theme Name:        Homewood Theme
Theme URI:         https://homewood.bankoprojects.com/
Author:            Banko Projects
Author URI:        https://homewood.bankoprojects.com/
Description:       Custom block (Gutenberg/FSE) theme for homewood.bankoprojects.com.
Version:           0.1.13
Requires at least: 6.0
Tested up to:      6.5
Requires PHP:      8.0
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       homewood-theme
*/

/**
 * The type scale.
 *
 * Instrument Sans throughout, at three widths:
 *
 *                                  desktop   tablet   mobile
 *   H1  semibold   line height 1.05    52px     44px     36px
 *   H2  regular    line height 1.1     46px     38px     32px
 *   H3  semibold   line height 1.25    24px     24px     22px
 *   H4  regular    line height 1.3     20px     20px     20px  uppercase
 *   H5  semibold   line height 1.3     20px     20px     20px
 *   P   regular    line height 1.3     20px / 26px
 *
 * Only the display sizes step down. H4 is the button size as well as a
 * heading, and H5 is body size set in semibold; at 20px both are already
 * reading size on a phone, and shrinking them would put H5 below the
 * paragraphs it introduces.
 *
 * The sizes are set as WordPress's own preset variables rather than as rules
 * on h1…h5. theme.json points every heading — and the button — at those
 * variables, so changing them here moves the headings, the size names in the
 * block editor's font size control, and any size an editor has picked by
 * hand, all together. Weight, line height, tracking and colour stay in
 * theme.json, which is what the editor reads them from.
 *
 * The names carry a dash before the digit — h-1, not h1 — because WordPress
 * kebab-cases a preset slug on its way to becoming a custom property. The
 * slugs in theme.json are spelled that way to match; spelling either of them
 * "h1" leaves the heading pointing at a variable that does not exist, and a
 * font-size that falls back to the 20px it inherits.
 *
 * They are declared on body rather than :root deliberately. Custom properties
 * inherit, so a value on body beats the one global styles puts on :root for
 * everything inside the page, whichever order the two stylesheets land in —
 * and the block editor rewrites a body selector to its canvas wrapper, so the
 * same rules follow into the editor.
 */

body {
	--wp--preset--font-size--h-1: 3.25rem;  /* 52px */
	--wp--preset--font-size--h-2: 2.875rem; /* 46px */
	--wp--preset--font-size--h-3: 1.5rem;   /* 24px */
	--wp--preset--font-size--h-4: 1.25rem;  /* 20px */
	--wp--preset--font-size--h-5: 1.25rem;  /* 20px */
}

/* Tablet, and anything narrower than a laptop. */
@media (max-width: 1024px) {
	body {
		--wp--preset--font-size--h-1: 2.75rem;  /* 44px */
		--wp--preset--font-size--h-2: 2.375rem; /* 38px */
	}
}

/* Phone. */
@media (max-width: 767px) {
	body {
		--wp--preset--font-size--h-1: 2.25rem;  /* 36px */
		--wp--preset--font-size--h-2: 2rem;     /* 32px */
		--wp--preset--font-size--h-3: 1.375rem; /* 22px */
	}
}

:root :where(.is-layout-flex) {
    gap: 80px !important;
}
@media (max-width: 780px) {
	:root :where(.is-layout-flex) {
		gap: 25px !important;
	}
}

.hw-separator {
	margin-top: 30px;
    margin-bottom: 70px;
}
@media (max-width: 780px) {
	.hw-separator {
		margin-top: 20px;
		margin-bottom: 40px;
	}
}

.hw-group {
	padding:4.25em 6em;
	margin:0px!important;
}
.hw-group-bg {
	padding:4.25em 6em;
	margin:0px!important;
}
.hw-group-top {
	padding:1.5em 6em 4.25em 6em;
	margin:0px!important;
}
.hw-group-sml {
	padding:1.25em 6em;
	margin:0px!important;
}

@media (max-width: 1300px) {
	.hw-group-sml,
	.hw-group-top,
	.hw-group-bg,
	.hw-group {
		padding-left:40px;
		padding-right:40px;
		padding-bottom:1.5em;
	}
	.hw-group-bottom, .hw-group-bg {
		padding-bottom:4.25em;
	}
}

@media (max-width: 1300px) {
	.about-stats {
		display: block !important;
	}
}

footer.wp-block-template-part {
	margin:0px !Important;
}
/*
 * Testimonials: a three-up that steps down to two, then one.
 *
 * The row is turned into a grid rather than left as flex. A flex row would
 * need each group given a flex-basis of calc((100% - 2 * gap) / 3), which has
 * to know the gap — and the gap here is 80px on desktop and 25px on a phone,
 * so the basis would have to be restated at every breakpoint alongside it.
 * Grid divides what is left after the gaps on its own, whatever the gap is.
 *
 * display and the track count are !important because core prints the row's
 * own layout rules — display:flex, and the flex properties on the generated
 * .wp-container-* class — at the same specificity as this class, and in a
 * stylesheet that can land after this one.
 */
.hw_testimonials {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	/* Flex centres its items; in a grid that leaves cards of unequal height
	   floating against each other rather than sitting on a common baseline. */
	align-items: stretch;
}

/* A grid child will not shrink below its content unless told it may, which is
   what pushes a long word or a wide image out past the column. */
.hw_testimonials > * {
	min-width: 0;
}

@media (max-width: 1024px) {
	.hw_testimonials {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 640px) {
	.hw_testimonials {
		grid-template-columns: 1fr !important;
	}
}
