/*
Theme Name: Mitscheles
Template: Impreza
Version: 1.0.0
Author: Brett Widmann
Theme URI: https://brettwidmann.com/
Author URI: https://brettwidmann.com/
Description: Impreza child theme for the Mitscheles website.
Text Domain: mitscheles
*/

/*
 * Mitscheles child theme additions: only what native Impreza options and element css= cannot do.
 * Every rule is listed in NOTES.md ("Custom CSS"). Values are from the live css/style.css unless noted.
 * Header Builder and us_additional_menu selectors are to confirm on the first push.
 */

/* Varela Round (footer links and copyright line): not one of the theme typography fonts, so it is loaded here. */
@import url("https://fonts.googleapis.com/css2?family=Varela+Round&display=swap");

/* Inner header on phones: the licence line in the bottom area took the header's white text colour on the parchment
   band (1.1:1); live shows it in #555 (QA pass 2026-10-31). The home header is transparent and keeps white. */
.l-header:not(.bg_transparent) .l-subheader.at_bottom .w-text:not(.has_text_color) { color: #555555; }

/* Home header on phones narrower than 388px (leftovers round 2): the 12px licence line is one 373px nowrap line, which
   pushed the page sideways (388px at 360 to 381px). Let it wrap there. */
@media (max-width: 387px) {
	.l-subheader.at_bottom .w-text.nowrap {
		white-space: normal;
	}
}

/* No back-to-top button on live; Impreza adds one by default. */
.w-toplink { display: none !important; }

/* Estimate and contact forms: live textareas are about 98px tall (Jotform), Gravity Forms' large box is 230px. */
.gform_wrapper .gform_body textarea { height: 98px; min-height: 98px; }

/* Nav bar: live paints #585f67 on the 1200px container only (navbar-bg.jpg swatch). The Header Builder colours
   a whole area edge to edge, so the middle area is transparent with a 1200px custom width and its inner box is
   painted here. */
.l-subheader.at_middle .l-subheader-h {
	background: var(--color-slate);
}

/* Dropdown items: 1px #595c5f rule under each item and #232426 hover (.dropdown-menu > li > a). */
.l-subheader.at_middle .w-nav-list.level_2 > .menu-item > a {
	border-bottom: 1px solid #595c5f;
}
.l-subheader.at_middle .w-nav-list.level_2 > .menu-item > a:hover,
.l-subheader.at_middle .w-nav-list.level_2 > .menu-item > a:focus-visible {
	background: #232426;
}

/* Sidebar menu (us_additional_menu in page-blocks/sidebar.txt): .about-mitchele ul li { padding-left: 21px },
   links 13px uppercase #222 with 5px top and bottom padding, hover background #d9d7d0. Live has no
   current-page state, so the current item keeps the normal look. */
.mitscheles-sidebar-menu .menu-item > a,
.mitscheles-sidebar-menu .current-menu-item > a {
	display: block;
	padding: 5px 0 5px 21px;
	color: var(--color-ink);
	text-decoration: none;
}
.mitscheles-sidebar-menu .menu-item > a:hover,
.mitscheles-sidebar-menu .menu-item > a:focus-visible {
	background: var(--color-hover);
	color: var(--color-ink);
}

/* Home list of nine links: .information ul li { background: url(listbullete.png) left no-repeat; padding-left: 20px }
   (a 3 x 3 px #adadad dot), links padding-left 15px #222, .product_listing li { margin: 0 0 10px 10px }. */
.mitscheles-dot-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.mitscheles-dot-list li {
	line-height: 24px; /* live link line-height 24px at every width; the phone body is 18px (parity 2026-11-16) */
	margin: 0 0 10px 10px;
	padding-left: 35px;
	background: linear-gradient(#adadad, #adadad) 0 50% / 3px 3px no-repeat;
}
.mitscheles-dot-list a {
	color: var(--color-ink);
}

/* Installation and maintenance lists: Bootstrap disc bullets (ul padding-left 40px) plus
   .product_listing li { margin: 0 0 10px 10px }. Text starts at x=185 on a 1440 screen. */
.mitscheles-list ul {
	list-style: disc;
	margin: 0 0 0 45px;
}
.mitscheles-list li {
	margin: 0 0 10px 10px;
}

/* About portrait: inline style on live: float left, margin 17px 39px 4px 0, 300 x 350 box with overflow hidden,
   so the top of the 3:4 photo shows. The six paragraphs wrap around it (about page head style:
   .information p { padding-top: 17px; padding-bottom: 0 }). */
.w-image.mitscheles-float-left {
	float: left;
	margin: 17px 39px 4px 0;
}
.w-image.mitscheles-float-left img {
	object-position: 50% 0;
}
.mitscheles-about-text p {
	margin: 0;
	padding-top: 17px;
}
@media (max-width: 600px) {
	.w-image.mitscheles-float-left {
		float: none;
		margin: 0 0 17px;
	}
}

/* Footer links: one inline row (.navmenu-list li { float: left; padding-right: 2% } plus the Bootstrap nav link
   padding, 31px between labels at 1440), the copyright line on a second row, underline on hover
   (.footer .nav li a:hover). Phones centre the items (responsive.css max-width 480px). */
.mitscheles-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.mitscheles-footer li {
	display: inline-block;
	margin: 0 31px 0 0;
}
/* Each row is a Bootstrap .nav link (parity 2026-11-16): 10px text, line-height 14.29px, 10px padding above and
   below, so rows are 34px; the copyright line is one more row of the same kind (49px over two lines on phones). */
.mitscheles-footer a {
	display: inline-block;
	line-height: 14.29px;
	padding: 10px 0;
}
.mitscheles-footer p {
	margin: 0;
}
.mitscheles-footer a:hover,
.mitscheles-footer a:focus-visible {
	text-decoration: underline;
}
@media (max-width: 600px) {
	.mitscheles-footer li {
		margin: 0 8px;
	}
}

/* Home credit line under the footer: Bootstrap link blue, underline on hover. */
.mitscheles-credit p {
	margin: 0;
}
.mitscheles-credit a {
	color: var(--color-bluehover); /* live #428bca is 3.2:1 on the page colour; the live hover blue is 5.4:1 */
	/* The credit now sits flush under the copyright row (as on live), so the link gets a 24px target
	   (WCAG 2.5.8) with margins that cancel it out of the layout. */
	display: inline-block;
	padding: 2px 0;
	margin: -2px 0;
}
.mitscheles-credit a:hover,
.mitscheles-credit a:focus-visible {
	color: var(--color-bluedark);
	text-decoration: underline;
}

/* Contact form card heading "Contact Us" (the Gravity Forms title, shown on this form only): live Jotform header
   18px bold with a 1px #e6e6e6 rule about 20px under it (contact-d.jpg pixel sample). */
.gform_wrapper .gform_title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e6e6e6;
}

/* Form labels (parity 2026-11-16): both live Jotforms use 14px bold #555 labels, 9px above the input, with a red
   asterisk (the forms' required_indicator is asterisk). Live's #f00 is 4.0:1 on white; #e00000 is 5.0:1. */
.gform_wrapper.gravity-theme .gfield_label {
	font-size: 14px;
	color: #555;
	margin-bottom: 9px;
}
.gform_wrapper.gravity-theme .gfield_required {
	font-size: 14px;
	color: #e00000;
}

/* Contact form card only (fifth parity round 2026-11-16): the live contact Jotform spaces its rows 91px apart
   (li padding 12 + 12, margin 12) and puts 168px between the top of the message box and the Submit row
   (probed at the iframe's 460px width). Gravity Forms' 16px row gap gives 75 and 137. The home estimate form
   keeps the defaults. Phones keep them too: the contact page there is already within 1% of live. */
@media (min-width: 601px) {
	.mitscheles-contact-card .gform_wrapper.gravity-theme .gform_fields {
		row-gap: 32px;
	}
	.mitscheles-contact-card .gform_wrapper.gravity-theme .gform_footer {
		margin-top: 37px;
	}
}

/* 992 to 1024px (leftovers round 2026-11-17): live's Bootstrap columns (col-md-8 + col-md-4, col-md-6 + col-md-6)
   stack below 992px, Impreza's tablets breakpoint is 1024px, so rows that set tablets_columns=1 stacked from 1024px
   instead of 991px. Two columns again in that band; one class more than Impreza's .g-cols.tablets-cols_1 so this wins. */
@media (min-width: 992px) and (max-width: 1024px) {
	.g-cols.via_grid.cols_2-1.tablets-cols_1 {
		grid-template-columns: 2fr 1fr;
		--cols: 2;
	}
	.g-cols.via_grid.cols_2.tablets-cols_1 {
		grid-template-columns: repeat(2, 1fr);
		--cols: 2;
	}
}

/* Portfolio at every width (leftovers round 2, 2026-11-17): live's ul.gallery is a flow of 230 x 158.7px photos
   (inline images, 3.6px apart, no row gap), so the count per row is whatever the column holds: 1 up to 480px,
   2 from 481 to 737px, 3 from 738 to 991px (the column is full width there), 2 again from 992 to about 1106px
   (the column is 591 to 693px), 3 from about 1107px. A grid of 230px auto-fill columns with a 3.6px gap gives the
   same count from the same column width. The gallery is pulled left to live's x=25 up to 1199px, and the 680px cap
   in the element css is lifted (it kept 3 photos at 213px and ruled out the 4 photos per row of 800px or more). */
.w-gallery.mit-portfolio {
	max-width: 780px !important; /* the element's generated rule is !important; 780px is live's widest gallery */
}
.w-gallery.mit-portfolio .w-gallery-list {
	grid-template-columns: repeat(auto-fill, 230px);
	gap: 0 3.6px;
}
.w-gallery.mit-portfolio .w-gallery-item {
	aspect-ratio: 230 / 158.7;
}
@media (min-width: 601px) and (max-width: 1199px) {
	.w-gallery.mit-portfolio {
		margin-left: -15px !important; /* the element's 8px margin less 23px: x=25 as on live */
	}
}
/* live's column width by band (viewport 769 to 991: vw - 70; 992 to 1024: about vw - 400; from 1025: 2/3 vw - 41) */
@media (min-width: 769px) and (max-width: 991px) {
	.w-gallery.mit-portfolio {
		margin-right: 30px;
	}
}
@media (min-width: 992px) and (max-width: 1024px) {
	.w-gallery.mit-portfolio {
		margin-right: 20px;
	}
}
@media (min-width: 1025px) {
	.w-gallery.mit-portfolio {
		margin-right: -10px;
	}
}
/* From 1200px (leftovers round 3): live's gallery is x=25 and 760px wide at 1200, grows by 2/3 px per px to 780px
   at 1230 and keeps x=25 until 1230, then follows its centred 1180px container ((vw - 1180) / 2: 35 at 1250,
   130 at 1440). The port's column starts at x=40 up to 1260 and then follows the same container, so the pull
   left is 15px up to a column of 755px and fades to 0 at 775px (0.75 of the column less 581.25px, as a percent
   margin of the column); the 680px cap becomes live's 780px. */
@media (min-width: 1200px) {
	.w-gallery.mit-portfolio {
		margin-left: clamp(-15px, calc(75% - 581.25px), 0px) !important;
	}
}
/* Phones and small tablets (leftovers round 3): live's gallery starts at x=25 at 390 and 600 (the 601px rule above
   only started at 601). live's column is 10px narrower than the port's (350px at 390), which moves the 1 to 2 photo
   switch from 494 to 504px: the 10px now comes off the left, not the right (350 at 390, 560 at 600). */
@media (max-width: 600px) {
	.w-gallery.mit-portfolio {
		margin-left: 10px !important;
	}
}

/* Portfolio, leftovers round 4: (a) below 992px live's gallery is the column less 70px with no cap (710 at 780, 921 at
   991), so the 780px cap only applies from 992px up, where the column is narrower anyway; (b) live's photos are 230px
   boxes with 8px of padding all round, so the picture is 214px wide and starts 8px in (x=33 at 1200); (c) the sidebar
   sits 15px further right than the port's from 1025 to 1230px (x=900 against 885 at 1200), fading to 0 at 1260px
   where both follow the 1180px container, and from 992 to 1024px live's slope is 0.97 against the port's 0.833. */
@media (max-width: 991px) {
	.w-gallery.mit-portfolio {
		max-width: none !important;
	}
}
.w-gallery.mit-portfolio .w-gallery-item img {
	padding: 8px;
	background: none; /* Impreza's 10% grey would now show in the padding; live has none */
}
@media (min-width: 992px) and (max-width: 1024px) {
	.wpb_column:has(.w-gallery.mit-portfolio) + .wpb_column {
		position: relative;
		left: calc(13.67vw - 145px);
	}
}
@media (min-width: 1025px) and (max-width: 1259px) {
	.wpb_column:has(.w-gallery.mit-portfolio) + .wpb_column {
		position: relative;
		left: min(15px, calc(630px - 50vw));
	}
}

/* Banner photo, 601 to 1260px (leftovers round 3): live's inner-slider.jpg is x=15 and the viewport less 30px wide
   (min 1200px) from 601 up, the port's is 15px further in and 30px narrower (x=30, 541px at 601) because the column's
   15px side padding applies from 601. The column is the viewport less 60px up to 1260px, so a percent margin pulls
   the photo left by 15px up to a 1170px column and fades to 0 at 1200px (0.5 of the column less 600px), the right
   margin gives the 30px back, and the width is capped at 1200px as on live. 600px and below already match. */
@media (min-width: 601px) {
	.l-main .w-image:has(> .w-image-h > img[src*="inner-slider"]) {
		margin-left: clamp(-15px, calc(50% - 600px), 0px);
		margin-right: -15px;
		max-width: 1200px;
	}
}

/* Installation and maintenance photo, 601 to 991px (leftovers round 2): live's img is 100% of a column that sits
   at x=70, so it is the viewport less 100px wide (800 x 600 at 900px, 891 x 668 at 991px; the 687px original is
   upscaled). The port's img stayed at its 687px natural width and sat at x=80. */
@media (min-width: 601px) and (max-width: 991px) {
	.w-image.mit-service-photo {
		width: calc(100% - 45px) !important;
		margin-left: 30px !important;
	}
	.w-image.mit-service-photo img {
		width: 100%;
		max-width: none;
	}
}

/* Header logo below 344px (live accessibility pass, 2026-11-20): the logo is 314px wide with 15px either side, so at
   320px the page scrolled 9px sideways (WCAG 1.4.10 reflow). Scale it to the space. Impreza's
   .w-image[class*="ush_image_"]:not(.has_aspect_ratio) img sets width auto, so this needs one more class. */
@media (max-width: 343px) {
	.l-header .w-image.ush_image_1:not(.has_aspect_ratio) img {
		width: calc(100vw - 30px);
		height: auto;
	}
}

/* Phones (parity 2026-11-16): live shows the Portfolio as one column of 230 x 159 photos at the left with no gap
   (91 photos, 14,808px), and the Design page's three photos one per row at 230px, centred, about 15px apart. */
@media (max-width: 600px) {
	/* Impreza's phone rule sets two columns with a more specific selector, so these need !important */
	.w-gallery.mit-portfolio .w-gallery-list {
		grid-template-columns: repeat(auto-fill, 230px) !important;
		gap: 0 3.6px !important;
	}
	.w-gallery.mit-photos .w-gallery-list {
		grid-template-columns: 230px !important;
		justify-content: center;
		gap: 15px;
	}
}

/* ---- Shared by every port (sites/_kit/child-theme/port-base.css, appended by push_stack.py) ---- */

/* Visually hidden H1 that push_kit adds to a page with no H1 (one H1 per page, QA rule from Botanica). */
.port-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
.l-section.port-h1-row,
.l-section.port-h1-row > .l-section-h {
	padding: 0 !important;
	min-height: 0 !important;
}

/* An image given a width in its element css draws a box only that wide, so align="center" or "right" had nothing to
   align in and the image sat at the left of its column (Berghoff cover logo, Arcadia Tree logo, Siciliano affiliations
   and footer badge; measured 2026-11-16, live centres all of them). A full-width image box is unaffected. */
.w-image.align_center {
	margin-left: auto;
	margin-right: auto;
}
.w-image.align_right {
	margin-left: auto;
}

/* Keyboard focus on form fields and on the header's submenu toggle (WCAG 2.4.7). The field styles carry the live
   sites' unchanged focus colours and the theme sets outline none, so a focused field or toggle looked exactly like an
   idle one (Mitscheles, Arcadia Tree, BDG and Roots measured 2026-11-20). currentColor is the field's text colour. */
.gform_wrapper input:not([type=hidden]):not([type=submit]):focus-visible,
.gform_wrapper textarea:focus-visible,
.gform_wrapper select:focus-visible,
.l-header .w-nav-item-toggle:focus-visible {
	outline: 2px solid currentColor !important;
	outline-offset: 1px;
}

/* Links inside body copy are underlined so they do not rely on colour alone (WCAG 1.4.1; axe link-in-text-block).
   Squarespace underlines them on live. */
.l-main .wpb_text_column p a,
.l-main .wpb_text_column li a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}
