/*
Theme Name:   Kadence Silva Demo
Theme URI:    https://jeffs.sampleyoursitehere.com/
Description:  Child theme for the Jeff's Home & Small Business Services demo build. Carries the slate and amber direction converted from the AI Studio prototype. Internal Digital Maestro spec asset, not a client deliverable.
Author:       Digital Maestro
Template:     kadence
Version:      2026.09.18
Text Domain:  kadence-silva
*/

/*
 * Palette lifted from the prototype's Tailwind classes, with two deliberate
 * corrections. slate-400 on a light background measures about 3.1:1, which
 * fails WCAG AA for body text, so light-background helper text uses slate-600.
 * And the base font size is 18px rather than the prototype's 16px, because the
 * audience here skews to older homeowners; that floor is carried over from the
 * sibling demo rather than reinvented.
 */
:root {
	/*
	 * Shield and Stripe, taken from Jeff's badge logo rather than invented.
	 * Sampled from the artwork: the shield navy, the flag red of the banner,
	 * and the gold of the wordmark, outline and stars. Matches the values the
	 * sibling demo at jeff.sampleyoursitehere.com already uses, so the two
	 * builds cannot drift apart on brand.
	 */
	--dm-navy-950: #000B1A;
	--dm-navy-900: #002049;
	--dm-navy-800: #0A3260;
	--dm-navy-700: #154878;
	--dm-navy-600: #3C6C99;
	--dm-navy-400: #8FAFCE;
	--dm-navy-300: #B4CBE0;
	--dm-navy-200: #D6E0EB;
	--dm-navy-100: #E9EFF5;
	--dm-navy-50:  #F5F8FB;

	--dm-gold-500: #EFC05F;
	--dm-gold-400: #F6D384;
	--dm-gold-300: #F8E0A8;
	--dm-gold-100: #FDF3DC;
	--dm-gold-900: #5A3F06;

	/*
	 * Red is the banner colour on the badge and it behaves like one: solid
	 * blocks carrying white text, never text on navy. Red on the navy measures
	 * 3.01:1 and fails AA, which is why it appears nowhere as a text colour on
	 * a dark panel.
	 */
	--dm-red-600: #D80000;
	--dm-red-700: #B00000;

	--dm-radius-lg: 1rem;
	--dm-radius-xl: 1.5rem;
	--dm-body-size: 1.125rem;

	/*
	 * Archivo for headings, Public Sans for everything else: the pair the
	 * sibling demo loads and the pair the client's brand guide names. Set on
	 * Kadence's own variables so every Kadence rule that reads them follows,
	 * and this sheet loads after Kadence's inline :root block, so these win on
	 * order. The system stack stays as the fallback while the fonts load.
	 */
	--global-body-font-family:    'Public Sans', system-ui, sans-serif;
	--global-heading-font-family: 'Archivo', system-ui, sans-serif;
}

body {
	font-family: var(--global-body-font-family);
	font-size: var(--dm-body-size);
	line-height: 1.65;
	color: var(--dm-navy-900);
}

/*
 * Kadence leaves its heading family at "inherit" unless a font is picked in the
 * Customizer, so the variable alone would not reach the headings.
 */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--global-heading-font-family);
}

/* The prototype leans on very heavy display weights for section headings. */
.dm-section-title {
	font-family: var(--global-heading-font-family);
	font-weight: 900;
	letter-spacing: -0.025em;
	line-height: 1.1;
}

.dm-panel-dark {
	background: var(--dm-navy-900);
	color: #ffffff;
}

.dm-panel-light {
	background: var(--dm-navy-50);
	color: var(--dm-navy-900);
}

/* Pill badge above each section heading. Carries the badge's red banner, which
   is the one place the logo uses red, so it reads as Jeff's rather than generic. */
.dm-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	background: var(--dm-red-600);
	color: #ffffff;
}

.dm-panel-dark .dm-eyebrow {
	background: rgba( 239, 192, 95, 0.18 );
	color: var(--dm-gold-300);
	border: 1px solid rgba( 239, 192, 95, 0.32 );
}

.dm-btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: var(--dm-gold-500);
	color: var(--dm-navy-950);
	font-weight: 800;
	padding: 0.9rem 1.6rem;
	border-radius: var(--dm-radius-lg);
	border: 0;
	cursor: pointer;
	text-decoration: none;
	min-height: 48px;
}

.dm-btn-primary:hover,
.dm-btn-primary:focus-visible {
	background: var(--dm-gold-400);
	color: var(--dm-navy-950);
}

/* Helper text on light panels. slate-600 rather than the prototype's slate-400. */
.dm-muted {
	color: var(--dm-navy-600);
}

.dm-panel-dark .dm-muted {
	color: var(--dm-navy-300);
}

/* Keyboard focus has to stay visible against both panels. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--dm-gold-500);
	outline-offset: 2px;
}

/*
 * Kadence colours headings from its own global palette, at a higher specificity
 * than a bare element selector, so the dark panels need this to stop rendering
 * near-black text on a near-black background.
 */
.dm-panel-dark,
.dm-panel-dark p,
.dm-panel-dark li,
.dm-panel-dark cite {
	color: #ffffff;
}

.dm-panel-dark h1,
.dm-panel-dark h2,
.dm-panel-dark h3,
.dm-panel-dark h4,
.dm-panel-dark .wp-block-heading {
	color: #ffffff;
}

.dm-panel-dark .dm-muted,
.dm-panel-dark .dm-fineprint {
	color: var(--dm-navy-300);
}

/* The amber total card sits on the dark panel but is a light surface itself. */
.dm-panel-dark .dm-estimator__total,
.dm-panel-dark .dm-estimator__total p {
	color: var(--dm-navy-950);
}

.dm-panel-dark .dm-estimator__total .dm-muted,
.dm-panel-dark .dm-estimator__total .dm-fineprint {
	color: var(--dm-gold-900);
}

.dm-panel-dark .dm-estimator__cta {
	color: var(--dm-gold-300);
}

/* Outline button on the dark hero: Kadence draws it in the palette accent,
   which reads as low contrast against slate-900. */
.dm-panel-dark .is-style-outline .wp-block-button__link {
	color: #ffffff;
	border-color: rgba( 255, 255, 255, 0.55 );
}

.dm-panel-dark .is-style-outline .wp-block-button__link:hover,
.dm-panel-dark .is-style-outline .wp-block-button__link:focus-visible {
	background: rgba( 255, 255, 255, 0.12 );
	border-color: #ffffff;
}

/* The primary button class lands on the wrapper, so the inner anchor is what
   actually paints. */
.dm-btn-primary .wp-block-button__link {
	background: var(--dm-gold-500);
	color: var(--dm-navy-950);
	font-weight: 800;
	border-radius: var(--dm-radius-lg);
	min-height: 48px;
	padding: 0.9rem 1.6rem;
}

.dm-btn-primary .wp-block-button__link:hover,
.dm-btn-primary .wp-block-button__link:focus-visible {
	background: var(--dm-gold-400);
	color: var(--dm-navy-950);
}

/* Sample review attributions should not read as louder than the quote. */
.dm-panel-light .wp-block-quote cite,
.wp-block-quote cite {
	color: var(--dm-navy-600);
	font-size: 0.9375rem;
	font-style: normal;
}

/* Section headings run long on a phone; the prototype's 3.25rem at -0.025em
   tracking overflows a 360px viewport. */
@media ( max-width: 600px ) {
	.dm-section-title {
		font-size: 2.1rem !important;
		letter-spacing: -0.015em;
	}
}

/* Kadence ships its drawer toggle at 31px, under the 44px touch minimum. */
.menu-toggle-open.drawer-toggle {
	min-width: 44px;
	min-height: 44px;
}

/*
 * Persistent call bar on phones.
 *
 * The prototype kept a call button in a sticky header. A fixed bar at the
 * bottom does the same job with the thumb rather than against it, and the
 * audience here is far more likely to phone than to fill in a form.
 */
.dm-callbar {
	display: none;
}

@media ( max-width: 900px ) {
	.dm-callbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1px;
		background: var(--dm-navy-700);
		box-shadow: 0 -2px 12px rgba( 0, 11, 26, 0.25 );
	}

	.dm-callbar a {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 56px;
		font-size: 1.0625rem;
		font-weight: 800;
		text-decoration: none;
		padding: 0.5rem;
	}

	/* "Call or text" plus the number is too long for half a phone width on one
	   line, so the two stack on purpose instead of wrapping mid-number. */
	.dm-callbar__call {
		background: var(--dm-gold-500);
		color: var(--dm-navy-950);
		flex-direction: column;
		line-height: 1.2;
	}

	.dm-callbar__num {
		font-size: 0.9375rem;
		font-weight: 700;
	}

	.dm-callbar__quote {
		background: var(--dm-navy-900);
		color: #ffffff;
	}

	/* Keep the bar from covering the end of the page. */
	body {
		padding-bottom: 56px;
	}
}

/* Section rhythm for the block-wrapped sections. */
.dm-section { padding: 4rem 1.25rem; }
.dm-section > .dm-eyebrow { margin-bottom: .75rem; }
.dm-section .dm-section-title { margin: 0 0 .75rem; font-size: 2.4rem; }
.dm-section .dm-lead { font-size: 1.125rem; margin: 0 0 2rem; max-width: 46rem; }

/* The ported sections bring their own padding, so the group must not double it. */
.dm-section .dm-gallery,
.dm-section .dm-reviews,
.dm-section .dm-faq { padding-left: 0; padding-right: 0; padding-top: 0; }

/* Kadence puts a max width on the content area; these sections are full bleed. */
.dm-hero, .dm-meet, .dm-footer, .dm-header { width: 100%; }

@media ( min-width: 640px ) {
	.dm-section { padding: 5rem 1.5rem; }
	.dm-section .dm-section-title { font-size: 2.75rem; }
}

/* ============ Nav dropdown ============ */

/*
 * The Service Areas submenu. Opens on hover and on :focus-within, so it is
 * reachable by keyboard without any JavaScript; a hover-only dropdown is
 * simply unusable for anyone tabbing through the header. The mobile drawer
 * does not use this at all: it renders the children inline and indented,
 * because a hover dropdown has no meaning on a touch screen.
 */
.dm-nav__group {
	position: relative;
}

.dm-nav__parent {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
}

.dm-nav__caret {
	width: .85em;
	height: .85em;
	transition: transform .15s ease;
}

.dm-nav__group:hover .dm-nav__caret,
.dm-nav__group:focus-within .dm-nav__caret {
	transform: rotate(180deg);
}

.dm-nav__sub {
	position: absolute;
	top: 100%;
	left: -.75rem;
	z-index: 40;
	min-width: 13.5rem;
	display: none;
	flex-direction: column;
	gap: .1rem;
	padding: .5rem;
	background: #fff;
	border: 1px solid var(--dm-navy-200);
	border-radius: var(--dm-radius-lg);
	box-shadow: 0 12px 28px rgba(0, 11, 26, .12);
}

.dm-nav__group:hover .dm-nav__sub,
.dm-nav__group:focus-within .dm-nav__sub {
	display: flex;
}

.dm-nav__sub a {
	font-size: .9375rem;
	font-weight: 700;
	padding: .5rem .6rem;
	border-radius: .6rem;
	white-space: nowrap;
}

.dm-nav__sub a:hover,
.dm-nav__sub a:focus-visible {
	background: var(--dm-navy-50);
	color: var(--dm-navy-900);
}

/* The drawer shows the whole tree at once. Tap targets stay at 48px. */
.dm-drawer__sub {
	display: grid;
	gap: .1rem;
	margin: 0 0 .35rem .75rem;
	padding-left: .75rem;
	border-left: 2px solid var(--dm-navy-700);
}

.dm-drawer__sub a {
	font-weight: 600;
	font-size: .9375rem;
	color: var(--dm-navy-300);
}

.dm-drawer__sub a:hover {
	color: #fff;
}

/*
 * The top bar's phone link now says what it is. The label sits before the
 * number and both stay on one line; the whole anchor was already a tel: link,
 * it just did not announce itself. The nav row's duplicate Call Jeff button
 * was removed at the same time, which also gave the longer "Service Areas"
 * label the room it needed.
 */
.dm-header__phone-label {
	font-weight: 800;
	margin-right: .1rem;
	white-space: nowrap;
}

/*
 * On a phone the top bar keeps "Registered, insured and bonded" and drops the number,
 * which otherwise wraps the bar to three lines above the fold. The number is
 * still in the hero list directly below and in the footer, so the page as a
 * whole still carries it as New Jersey requires.
 */
@media ( max-width: 479px ) {
	.dm-header__cred-hic {
		display: none;
	}
}
