/* UWebbz Technology - Components. One definition per component.
   Live specimens: brand guidelines ch. 09. */

/* Eyebrow -------------------------------------------------------------------
   Blue on light (8.1:1). Orange only on Ink (6.5:1); white on Brand Depth,
   where orange drops to 3:1 and fails at this size. */
.uw-eyebrow,
.is-style-eyebrow {
	display: inline-block;
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

:is(.has-contrast-background-color, .has-navy-background-color) :is(.uw-eyebrow, .is-style-eyebrow) {
	color: var(--wp--preset--color--accent) !important;
}

:is(.uw-on-dark, .uw-hero, .has-primary-background-color, .has-brand-depth-gradient-background, .has-primary-dark-gradient-background) :is(.uw-eyebrow, .is-style-eyebrow) {
	color: rgba(255, 255, 255, 0.85) !important;
}

/* Grid utility ----------------------------------------------------------------
   Use with layout "default" groups or a post-template. Resets the flow-layout
   margins WordPress adds to children, which otherwise break grid rows. */
.uw-grid {
	--uw-cols: 3;
	display: grid !important;
	grid-template-columns: repeat(var(--uw-cols), minmax(0, 1fr));
	gap: 1.5rem;
	list-style: none;
	padding: 0;
}

.uw-grid > * {
	margin: 0 !important;
}

.uw-grid.cols-2 { --uw-cols: 2; }
.uw-grid.cols-4 { --uw-cols: 4; }

@media (max-width: 1023px) {
	.uw-grid.cols-3,
	.uw-grid.cols-4 { --uw-cols: 2; }
}

@media (max-width: 640px) {
	.uw-grid,
	.uw-grid.cols-2,
	.uw-grid.cols-3,
	.uw-grid.cols-4 { --uw-cols: 1; }
}

/* Two-column split: content + supporting column. Stacks below 900px. */
.uw-split {
	display: grid !important;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	align-items: center;
}

.uw-split.is-top {
	align-items: start;
}

.uw-split > * {
	margin: 0 !important;
}

@media (max-width: 900px) {
	.uw-split {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Vertical stack with even rhythm (cards, columns). */
.uw-stack {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.uw-stack > * {
	margin: 0 !important;
}

/* Stretched link: the card's title link covers the whole card. */
.uw-stretch {
	position: relative;
}

.uw-stretch :is(h2, h3, h4) a {
	color: inherit;
	text-decoration: none;
}

.uw-stretch :is(h2, h3, h4) a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.uw-stretch:focus-within {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.uw-stretch :is(h2, h3, h4) a:focus-visible {
	outline: none;
}

.uw-card-cta {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--primary);
}

.uw-card-cta::after {
	content: "\2192";
	transition: transform var(--wp--custom--motion--base) var(--wp--custom--motion--ease);
}

.uw-stretch:hover .uw-card-cta::after {
	transform: translateX(3px);
}

/* Section header ------------------------------------------------------------ */
/* Width comes from the parent's constrained layout; only the text measure is
   capped. A max-width here would make the constrained layout center it. */
.uw-section-head {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: var(--wp--preset--spacing--40) !important;
}

.uw-section-head > :is(h2, p) {
	max-width: 44rem;
}

.uw-section-head > * {
	margin: 0 !important;
}

.uw-section-head.is-centered {
	align-items: center;
	text-align: center;
}

.uw-section-head.is-split {
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1.25rem 2rem;
}

.uw-section-head.is-split > .uw-section-head__text {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-width: 40rem;
}

.uw-section-head.is-split > .uw-section-head__text > * {
	margin: 0 !important;
}

.uw-lead {
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.6;
	color: var(--wp--preset--color--gray);
	max-width: 60ch;
}

/* Buttons --------------------------------------------------------------------
   Default (theme.json): Signal Orange with Ink text, the one main action.
   Variants below are registered block styles. */
.wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	transition:
		transform var(--wp--custom--motion--base) var(--wp--custom--motion--ease),
		box-shadow var(--wp--custom--motion--base) var(--wp--custom--motion--ease),
		background-color var(--wp--custom--motion--fast) ease,
		border-color var(--wp--custom--motion--fast) ease,
		color var(--wp--custom--motion--fast) ease;
}

.wp-block-button:where(:not(.is-style-outline, .is-style-link)) .wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 20px -10px rgba(221, 94, 31, 0.75);
}

.wp-block-button.is-style-brand .wp-block-button__link {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.wp-block-button.is-style-brand .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base);
	box-shadow: 0 10px 20px -10px rgba(9, 72, 178, 0.75);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary-50);
}

.wp-block-button.is-style-on-dark .wp-block-button__link {
	background-color: rgba(255, 255, 255, 0.1);
	color: var(--wp--preset--color--base);
	border: 2px solid rgba(255, 255, 255, 0.35);
	padding: calc(0.78rem - 2px) calc(1.4rem - 2px);
}

.wp-block-button.is-style-on-dark .wp-block-button__link:hover {
	background-color: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.6);
	box-shadow: none;
}

.wp-block-button.is-style-link .wp-block-button__link {
	background: none;
	padding: 0;
	color: var(--wp--preset--color--primary);
	border-radius: 0;
}

.wp-block-button.is-style-link .wp-block-button__link:hover {
	background: none;
	color: var(--wp--preset--color--primary-dark);
}

.wp-block-button.is-style-link .wp-block-button__link::after,
.wp-block-button.uw-arrow .wp-block-button__link::after {
	content: "\2192";
	transition: transform var(--wp--custom--motion--base) var(--wp--custom--motion--ease);
}

.wp-block-button.is-style-link .wp-block-button__link:hover::after,
.wp-block-button.uw-arrow .wp-block-button__link:hover::after {
	transform: translateX(3px);
}

.wp-block-buttons.is-size-lg .wp-block-button__link {
	font-size: 1rem;
	padding: 0.95rem 1.7rem;
}

.wp-block-buttons.is-size-lg .is-style-on-dark .wp-block-button__link,
.wp-block-buttons.is-size-lg .is-style-outline .wp-block-button__link {
	padding: calc(0.95rem - 2px) calc(1.7rem - 2px);
}

/* Tags & badges --------------------------------------------------------------- */
.uw-tag,
.uw-portfolio-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	width: fit-content;
	margin: 0;
	padding: 0.28rem 0.7rem;
	border-radius: var(--wp--custom--radius--pill);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
	background: var(--wp--preset--color--primary-50);
	color: var(--wp--preset--color--primary);
}

.uw-tag a,
.uw-portfolio-tag a {
	color: inherit;
	text-decoration: none;
}

.uw-tag.is-orange {
	background: var(--wp--preset--color--accent-50);
	color: var(--wp--preset--color--accent-700);
}

.uw-tag.is-neutral {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--gray);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--border);
}

.uw-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	width: fit-content;
	margin: 0;
	padding: 0.4rem 1rem;
	border-radius: var(--wp--custom--radius--pill);
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.22);
	color: var(--wp--preset--color--base);
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.4;
}

.uw-badge::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	flex-shrink: 0;
}

/* Card ------------------------------------------------------------------------ */
.uw-card,
.is-style-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--lg);
	transition:
		transform var(--wp--custom--motion--base) var(--wp--custom--motion--ease),
		box-shadow var(--wp--custom--motion--base) var(--wp--custom--motion--ease),
		border-color var(--wp--custom--motion--base) var(--wp--custom--motion--ease);
}

:where(.is-style-card) {
	padding: var(--wp--preset--spacing--30);
}

.uw-card:hover,
.is-style-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--wp--preset--shadow--raised);
	border-color: var(--wp--preset--color--primary-300);
}

.uw-card.is-static:hover,
.is-style-card.is-static:hover {
	transform: none;
	box-shadow: none;
	border-color: var(--wp--preset--color--border);
}

.uw-card-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

.uw-card-foot {
	margin-top: auto !important;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

/* Icon chip --------------------------------------------------------------------
   .uw-icon-circle is the legacy name; kept as an alias. */
.uw-icon-chip,
.uw-icon-circle {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	display: grid;
	place-items: center;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--primary-50);
	color: var(--wp--preset--color--primary);
	transition:
		background-color var(--wp--custom--motion--base) var(--wp--custom--motion--ease),
		color var(--wp--custom--motion--base) var(--wp--custom--motion--ease);
}

.uw-icon-chip > *,
.uw-icon-circle > * {
	margin: 0 !important;
}

.uw-icon-chip svg,
.uw-icon-circle svg {
	width: 22px;
	height: 22px;
	stroke: currentColor;
}

.uw-icon-chip img,
.uw-icon-circle img {
	width: 24px !important;
	height: 24px !important;
	object-fit: contain;
}

:is(.uw-card, .is-style-card):hover :is(.uw-icon-chip, .uw-icon-circle) {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

:is(.uw-card, .is-style-card):hover :is(.uw-icon-chip, .uw-icon-circle) img {
	filter: brightness(0) invert(1);
}

/* Numbered badge ---------------------------------------------------------------- */
.uw-badge-number {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	display: grid;
	place-items: center;
	margin: 0;
	border-radius: var(--wp--custom--radius--pill);
	border: 2px solid var(--wp--preset--color--primary-100);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

:is(.has-contrast-background-color, .has-navy-background-color) .uw-badge-number {
	border-color: rgba(246, 122, 60, 0.45);
	color: var(--wp--preset--color--accent);
}

/* Proof stat (on dark) ------------------------------------------------------------ */
.uw-stat {
	padding: 1.1rem 1rem;
	border-radius: var(--wp--custom--radius--lg);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.16);
	text-align: center;
}

.uw-stat > * {
	margin: 0 !important;
}

.uw-stat-value {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.65rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}

.uw-stat-label {
	margin-top: 0.3rem !important;
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.75);
}

/* Rating & checklist ----------------------------------------------------------- */
.uw-stars {
	margin: 0;
	color: var(--wp--preset--color--accent);
	letter-spacing: 0.12em;
	font-size: 0.95rem;
	line-height: 1;
}

.uw-checks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.45rem;
	font-size: var(--wp--preset--font-size--small);
}

.uw-checks li {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
}

.uw-checks li::before {
	content: "";
	width: 15px;
	height: 15px;
	margin-top: 0.22em;
	flex-shrink: 0;
	background: var(--wp--preset--color--primary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

:is(.uw-on-dark, .uw-hero, .has-contrast-background-color, .has-brand-depth-gradient-background) .uw-checks li::before {
	background: var(--wp--preset--color--accent);
}

/* FAQ accordion: one container, divided rows (core/details children) ------------- */
.uw-faq {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--lg);
	overflow: hidden;
}

.uw-faq > .wp-block-details {
	margin: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.uw-faq > .wp-block-details:last-child {
	border-bottom: none;
}

.uw-faq > .wp-block-details > summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1.15rem 1.4rem;
	font-weight: 600;
	transition: background-color var(--wp--custom--motion--fast) ease;
}

.uw-faq > .wp-block-details > summary::-webkit-details-marker {
	display: none;
}

.uw-faq > .wp-block-details > summary::after {
	content: "";
	width: 9px;
	height: 9px;
	flex-shrink: 0;
	margin-top: -4px;
	border-right: 2px solid var(--wp--preset--color--gray);
	border-bottom: 2px solid var(--wp--preset--color--gray);
	transform: rotate(45deg);
	transition: transform var(--wp--custom--motion--spatial) var(--wp--custom--motion--ease-spatial);
}

.uw-faq > .wp-block-details[open] > summary::after {
	transform: rotate(-135deg);
	margin-top: 4px;
}

.uw-faq > .wp-block-details > summary:hover {
	background: var(--wp--preset--color--surface);
}

.uw-faq > .wp-block-details > :not(summary) {
	margin: 0 !important;
	padding: 0 1.4rem 1.2rem;
	color: var(--wp--preset--color--gray);
	max-width: 64ch;
}

/* CTA panel: inset Brand Depth card --------------------------------------------- */
.uw-cta-panel {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--xl);
	box-shadow: var(--wp--preset--shadow--floating);
}

.uw-cta-panel::after {
	content: "";
	position: absolute;
	right: -140px;
	top: -170px;
	width: 440px;
	height: 440px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(246, 122, 60, 0.28), transparent 65%);
	pointer-events: none;
}

.uw-cta-panel > * {
	position: relative;
	z-index: 1;
}

/* Forms ---------------------------------------------------------------------------- */
:where(.uw-form) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea) {
	width: 100%;
	font: inherit;
	font-size: 0.95rem;
	color: var(--wp--preset--color--contrast);
	padding: 0.72rem 0.9rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--sm);
	transition:
		border-color var(--wp--custom--motion--fast) ease,
		box-shadow var(--wp--custom--motion--fast) ease;
}

:where(.uw-form) :is(input, select, textarea):hover {
	border-color: var(--wp--preset--color--primary-300);
}

:where(.uw-form) :is(input, select, textarea):focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 4px var(--wp--preset--color--primary-100);
}

:where(.uw-form) label {
	display: grid;
	gap: 0.4rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.uw-form-submit {
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0.78rem 1.4rem;
	border: none;
	border-radius: var(--wp--custom--radius--btn);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	transition:
		background-color var(--wp--custom--motion--fast) ease,
		transform var(--wp--custom--motion--base) var(--wp--custom--motion--ease);
}

.uw-form-submit:hover {
	background: var(--wp--preset--color--accent-dark);
	transform: translateY(-1px);
}

/* Section surfaces & dividers ------------------------------------------------------- */
.uw-section-surface {
	background: var(--wp--preset--color--surface);
}

.uw-divider {
	border: none;
	border-top: 1px solid var(--wp--preset--color--border);
	margin: 0;
}
