/*
 * Architect base stylesheet (2.0)
 *
 * Design lives in theme.json (colors, type, spacing, element and block styles).
 * This file only covers what theme.json can't: a reset, accessibility helpers,
 * WordPress core classes, legacy template wrappers and theme JS hooks.
 * Generated site styles load after this file and should not need to undo it.
 */

/* ---------------------------------------------------------------------------
 * Reset
 * ------------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

img,
video {
	height: auto;
}

/* Inline SVG icons inside text and buttons stay inline. */
a svg,
button svg,
p svg,
li svg {
	display: inline-block;
	vertical-align: middle;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

textarea {
	resize: vertical;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

table {
	border-collapse: collapse;
	width: 100%;
}

iframe {
	max-width: 100%;
	border: 0;
}

[hidden] {
	display: none !important;
}

/* ---------------------------------------------------------------------------
 * Accessibility
 * ------------------------------------------------------------------------ */

.screen-reader-text,
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

.skip-link:focus {
	position: fixed !important;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1rem;
	clip: auto;
	clip-path: none;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #000);
	box-shadow: var(--wp--preset--shadow--md, 0 4px 12px rgba(0, 0, 0, 0.15));
	text-decoration: none;
}

:focus-visible {
	outline: var(--wp--custom--focus--width, 2px) solid var(--wp--preset--color--primary, currentColor);
	outline-offset: var(--wp--custom--focus--offset, 2px);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------------------------------------------------------------------------
 * WordPress core classes (classic content, captions, galleries)
 * ------------------------------------------------------------------------ */

.alignleft {
	float: left;
	margin: 0.25em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.25em 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
	font-size: var(--wp--preset--font-size--small, 0.875em);
	color: var(--wp--preset--color--muted, inherit);
	margin-top: 0.5em;
}

.cf::after,
.clearfix::after {
	content: "";
	display: table;
	clear: both;
}

/* ---------------------------------------------------------------------------
 * Layout wrappers
 * ------------------------------------------------------------------------ */

/* Legacy blog templates (single, index, archive, search, 404) use .wrap. */
.wrap {
	width: 100%;
	/* theme.json wideSize is the content width (as WordPress uses it); the root padding sits outside it (base 2.3) */
	max-width: calc(var(--wp--style--global--wide-size, 1440px) + var(--wp--style--root--padding-left, 1.25rem) + var(--wp--style--root--padding-right, 1.25rem));
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--wp--style--root--padding-left, 1.25rem);
	padding-right: var(--wp--style--root--padding-right, 1.25rem);
}

/* Content column + sidebar on blog templates. */
@media (min-width: 1030px) {
	#inner-content.wrap:has(> .sidebar) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 18rem;
		gap: var(--wp--preset--spacing--60, 3rem);
		align-items: start;
	}
}

#inner-content.wrap > main,
#inner-content.wrap > .sidebar {
	width: auto;
	float: none;
	padding: 0;
}

.page-links,
.pagination,
.post-navigation {
	margin-top: var(--wp--preset--spacing--50, 2rem);
}

/* ---------------------------------------------------------------------------
 * Navigation (theme JS hooks)
 * ------------------------------------------------------------------------ */

/* Submenu toggle buttons added to main-nav by architect_add_submenu_toggle(). */
button.show-submenu {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.25em;
	margin: 0;
	background: none;
	border: 0;
	line-height: 1;
}

/* scripts.js adds .submenu-flip when a submenu would leave the viewport. */
.submenu-flip > .sub-menu {
	left: auto;
	right: 0;
}

/* ---------------------------------------------------------------------------
 * Gravity Forms helpers (gf-grouped-columns / gf-animate-labels form classes)
 * ------------------------------------------------------------------------ */

.gf-grouped-columns .gform_fields > .gf-columns-outer {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	width: 100%;
	grid-column: 1 / -1;
}

.gf-grouped-columns .gf-column {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.gf-grouped-columns .gf-column > .gfield {
	margin: 0;
	width: 100%;
	grid-column: auto !important;
}

@media (min-width: 768px) {
	.gf-grouped-columns .gform_fields > .gf-columns-outer {
		grid-template-columns: repeat(var(--gf-column-count, 2), minmax(0, 1fr));
	}
}

form.gf-animate-labels :is(.gfield--type-text, .gfield--type-email, .gfield--type-phone, .gfield--type-textarea) {
	position: relative;
}

form.gf-animate-labels :is(.gfield--type-text, .gfield--type-email, .gfield--type-phone, .gfield--type-textarea) :is(input, textarea) {
	padding-top: 24px !important;
	padding-bottom: 8px !important;
	height: 44px;
}

form.gf-animate-labels .gfield--type-textarea textarea {
	height: auto;
	min-height: 120px;
}

form.gf-animate-labels :is(.gfield--type-text, .gfield--type-email, .gfield--type-phone, .gfield--type-textarea) :is(input, textarea)::placeholder {
	opacity: 0;
}

form.gf-animate-labels :is(.gfield--type-text, .gfield--type-email, .gfield--type-phone, .gfield--type-textarea) .gfield_label {
	position: absolute;
	top: 16px;
	left: 10px;
	z-index: 2;
	margin: 0 !important;
	padding: 0 4px;
	line-height: 1;
	pointer-events: none;
	transform-origin: left top;
	transition: transform 0.2s ease, top 0.2s ease, color 0.2s ease;
}

form.gf-animate-labels :is(.gfield--type-text, .gfield--type-email, .gfield--type-phone, .gfield--type-textarea):is(.is-focused, .has-value) .gfield_label {
	top: 6px;
	transform: scale(0.75);
}

form.gf-animate-labels .gfield_required {
	margin-left: 2px;
}

/* ---------------------------------------------------------------------------
 * Shortcode output ([arch info], [arch social])
 * ------------------------------------------------------------------------ */

.arch-info-hours,
.arch-social {
	margin: 0;
	padding: 0;
	list-style: none;
}

address.arch-info-address {
	font-style: normal;
}

.arch-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
}

/* ---------------------------------------------------------------------------
 * Header and footer regions (parts/header.html, parts/footer.html)
 * ------------------------------------------------------------------------ */

.site-header,
.site-footer {
	position: relative;
}

/* Shortcode blocks render inside a <p>; keep them from adding space in rows. */
.site-header p:has(> .arch-info),
.site-footer p:has(> .arch-info-block, > .arch-info-hours, > .arch-social) {
	margin: 0;
}

/* Starter header: keep the row on one line on phones (the menu collapses). */
@media (max-width: 781px) {
	.site-header p:has(> .site-header__phone),
	.site-header .wp-block-buttons {
		display: none;
	}
}
