/* =============================================================================
 * D&E Elementor Components — design-system widget styles.
 * -----------------------------------------------------------------------------
 * Only the internals of each component widget live here. Section layout,
 * backgrounds, and spacing are owned by Elementor Flexbox Containers, and the
 * global colour/type tokens come from the child theme's design-system.css.
 *
 * Every value falls back to a literal so components still render correctly if
 * the theme stylesheet is ever unavailable (e.g. inside the Elementor editor
 * canvas before the theme CSS loads).
 * ========================================================================== */

.de-c-spec, .de-c-chip, .de-c-value, .de-c-step,
.de-c-stat, .de-c-tile, .de-c-tl, .de-c-frame, .de-c-meta,
.de-c-review, .de-c-rating {
	--de-c-mono:    var(--de-font-mono, 'JetBrains Mono', ui-monospace, Menlo, monospace);
	--de-c-display: var(--de-font-display, 'Space Grotesk', Arial, sans-serif);
	--de-c-body:    var(--de-font-body, 'Inter', Arial, sans-serif);
	--de-c-ink:     var(--de-ink, #0B0F17);
	--de-c-blue:    var(--de-blue, #0066FF);
	--de-c-yellow:  var(--de-yellow, #FFB800);
	--de-c-line:    var(--de-hairline, #E2E8F0);
	--de-c-muted:   var(--de-text-muted, #424656);
	--de-c-canvas:  var(--de-canvas, #FFFFFF);
}

/* =============================================================================
 * Spec Label
 * ========================================================================== */
.de-c-spec {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--de-c-mono);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.3;
	color: var(--de-c-blue);
}
.de-c-spec--indexed { width: 100%; }
.de-c-spec__marker {
	flex: 0 0 auto;
	width: 6px; height: 6px;
	background: currentColor;
}
.de-c-spec__code,
.de-c-spec__text { color: inherit; }
.de-c-spec__code { font-weight: 700; }
.de-c-spec__rule {
	flex: 1 1 auto;
	height: 1px;
	background: var(--de-c-line);
	margin-left: 0.25rem;
}

/* =============================================================================
 * Chip / Status Pin
 * ========================================================================== */
.de-c-chip-wrap { display: flex; }
.de-c-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.75rem;
	background: var(--de-substrate, #F1F5F9);
	border: 1px solid var(--de-c-line);
	border-radius: 0;
	font-family: var(--de-c-mono);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--de-c-blue);
	line-height: 1.3;
}
.de-c-chip__dot {
	position: relative;
	flex: 0 0 auto;
	width: 8px; height: 8px;
	background: var(--de-c-blue);
}
.de-c-chip__dot--pulse::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--de-c-blue);
	animation: deCPulse 1.8s ease-out infinite;
}
@keyframes deCPulse {
	0%   { opacity: .8; transform: scale(1); }
	80%, 100% { opacity: 0; transform: scale(2.6); }
}
@media (prefers-reduced-motion: reduce) {
	.de-c-chip__dot--pulse::after { animation: none; }
}

/* =============================================================================
 * Value / Spec Item
 * ========================================================================== */
.de-c-value {
	display: block;
	background: var(--de-c-canvas);
	border: 1px solid var(--de-c-line);
	border-radius: 0;
	padding: 1.25rem;
	transition: border-color 150ms linear;
	height: 100%;
	text-decoration: none;
}
.de-c-value:hover { border-color: var(--de-c-ink); }
.de-c-value--link { color: inherit; }
.de-c-value__head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}
.de-c-value__code {
	font-family: var(--de-c-mono);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--de-c-blue);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.de-c-value__code::before {
	content: '';
	width: 6px; height: 6px;
	background: currentColor;
}
.de-c-value__title {
	margin: 0;
	font-family: var(--de-c-display);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: var(--de-c-ink);
	line-height: 1.3;
}
.de-c-value__body {
	margin: 0;
	font-family: var(--de-c-body);
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--de-c-muted);
}

/* =============================================================================
 * Process Step
 * ========================================================================== */
.de-c-step {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	background: var(--de-c-canvas);
	border: 1px solid var(--de-c-line);
	border-radius: 0;
	padding: 1.5rem;
	height: 100%;
	transition: border-color 150ms linear;
}
.de-c-step:hover { border-color: var(--de-c-ink); }
.de-c-step__label {
	font-family: var(--de-c-mono);
	font-size: 0.625rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--de-c-muted);
}
.de-c-step__num {
	font-family: var(--de-c-display);
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--de-c-blue);
}
.de-c-step__rule { display: block; width: 32px; height: 2px; background: var(--de-c-blue); }
.de-c-step__title {
	margin: 0;
	font-family: var(--de-c-display);
	font-size: 1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	color: var(--de-c-ink);
	line-height: 1.3;
}
.de-c-step__body {
	margin: 0;
	font-family: var(--de-c-body);
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--de-c-muted);
}

/* =============================================================================
 * Stat Card
 * ========================================================================== */
.de-c-stat {
	background: var(--de-c-canvas);
	border: 1px solid var(--de-c-line);
	border-radius: 0;
	padding: 1.25rem;
	height: 100%;
}
.de-c-stat__label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--de-c-mono);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--de-c-blue);
}
.de-c-stat__label::before {
	content: '';
	width: 6px; height: 6px;
	background: currentColor;
}
.de-c-stat__figure {
	margin: 0.5rem 0;
	font-family: var(--de-c-display);
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: var(--de-c-ink);
}
.de-c-stat__body {
	margin: 0;
	font-family: var(--de-c-body);
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--de-c-muted);
}

/* =============================================================================
 * Project Tile
 * ========================================================================== */
.de-c-tile {
	display: flex;
	flex-direction: column;
	margin: 0;
	background: var(--de-c-canvas);
	border: 1px solid var(--de-c-line);
	border-radius: 0;
	height: 100%;
	transition: border-color 150ms linear;
	overflow: hidden;
}
.de-c-tile:hover { border-color: var(--de-c-ink); }
.de-c-tile__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.de-c-tile__media { overflow: hidden; line-height: 0; }
.de-c-tile__media img {
	display: block;
	width: 100%;
	height: 260px;
	object-fit: cover;
	border-radius: 0;
	transition: transform 400ms ease-out;
}
.de-c-tile__media--zoom:hover img { transform: scale(1.03); }
.de-c-tile__caption {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem 1.25rem;
}
.de-c-tile__cat {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--de-c-mono);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--de-c-blue);
}
.de-c-tile__cat::before {
	content: '';
	width: 6px; height: 6px;
	background: currentColor;
}
.de-c-tile__title {
	margin: 0;
	font-family: var(--de-c-display);
	font-size: 1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	color: var(--de-c-ink);
	line-height: 1.3;
}
.de-c-tile__body {
	margin: 0.25rem 0 0;
	font-family: var(--de-c-body);
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--de-c-muted);
}

/* =============================================================================
 * Timeline Item
 * ========================================================================== */
.de-c-tl {
	border: 1px solid var(--de-ink-4, #1E293B);
	border-radius: 0;
	padding: 1.25rem 1.5rem;
	background: transparent;
	height: 100%;
}
.de-c-tl--highlight {
	background: var(--de-c-blue);
	border-color: var(--de-c-blue);
}
.de-c-tl__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}
.de-c-tl__year {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--de-c-mono);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--de-yellow-active, #F59E0B);
}
.de-c-tl__year::before {
	content: '';
	width: 6px; height: 6px;
	background: currentColor;
}
.de-c-tl__title {
	margin: 0;
	font-family: var(--de-c-display);
	font-size: 1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	color: #F8FAFC;
	line-height: 1.3;
}
.de-c-tl__body {
	margin: 0;
	font-family: var(--de-c-body);
	font-size: 0.9rem;
	line-height: 1.55;
	color: #CBD5E1;
}
.de-c-tl--highlight .de-c-tl__year,
.de-c-tl--highlight .de-c-tl__title,
.de-c-tl--highlight .de-c-tl__body { color: #FFFFFF; }

/* =============================================================================
 * Image Frame
 * ========================================================================== */
.de-c-frame {
	position: relative;
	margin: 0;
	background: var(--de-substrate, #F1F5F9);
	border: 1px solid var(--de-c-line);
	border-radius: 0;
	overflow: hidden;
}
.de-c-frame__media { line-height: 0; overflow: hidden; }
.de-c-frame__media img {
	display: block;
	width: 100%;
	height: 460px;
	object-fit: cover;
	border-radius: 0;
	transition: transform 500ms ease-out;
}
.de-c-frame__media--zoom:hover img { transform: scale(1.04); }

.de-c-frame__caption {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.6rem 0.75rem;
	background: var(--de-c-ink);
	color: #FFFFFF;
	font-family: var(--de-c-mono);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.3;
}
/* Overlay variant floats a full-width bar inside the image */
.de-c-frame--cap-overlay .de-c-frame__caption {
	position: absolute;
	left: 0.75rem;
	right: 0.75rem;
	bottom: 0.75rem;
}

/* Badge variant: a compact box pinned to the image's bottom-left corner with
 * its two lines stacked — the "200A SERVICE UPGRADE VERIFIED / NEC SPEC"
 * lockup from the approved hero. */
.de-c-frame--cap-badge .de-c-frame__caption {
	position: absolute;
	left: 12px;
	bottom: 12px;
	right: auto;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 2px;
	padding: 8px 12px;
	background: rgba(11, 15, 23, 0.95);
	backdrop-filter: blur(4px);
	max-width: calc(100% - 24px);
}
.de-c-frame--cap-badge .de-c-frame__primary {
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--de-c-yellow);
}
.de-c-frame--cap-badge .de-c-frame__secondary {
	font-size: 0.625rem;
	letter-spacing: 0.1em;
	color: #94A3B8;
	white-space: normal;
}
.de-c-frame__primary { display: inline-flex; align-items: center; gap: 0.5rem; }
.de-c-frame__marker { flex: 0 0 auto; width: 8px; height: 8px; }
.de-c-frame__marker--yellow { background: var(--de-c-yellow); }
.de-c-frame__marker--blue   { background: var(--de-c-blue); }
.de-c-frame__secondary { font-style: normal; color: var(--de-blue-soft, #DAE1FF); white-space: nowrap; }

@media (max-width: 767px) {
	.de-c-frame--cap-overlay .de-c-frame__caption { position: static; margin: 0; }
	.de-c-frame__caption { flex-wrap: wrap; gap: 0.35rem; }
}

/* =============================================================================
 * Meta Row
 * ========================================================================== */
.de-c-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	font-family: var(--de-c-mono);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--de-c-muted);
}
.de-c-meta--stacked { flex-direction: column; align-items: stretch; gap: 0.5rem; }
.de-c-meta__item { display: inline-flex; align-items: center; gap: 0.5rem; }
.de-c-meta--stacked .de-c-meta__item { gap: 0.75rem; }
.de-c-meta__marker { flex: 0 0 auto; width: 6px; height: 6px; background: var(--de-c-blue); }
.de-c-meta__label {
	flex: 0 0 auto;
	color: var(--de-c-blue);
	font-weight: 700;
}
.de-c-meta--stacked .de-c-meta__label { min-width: 8rem; }
.de-c-meta--stacked .de-c-meta__text {
	font-family: var(--de-c-body);
	font-size: 0.9375rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--de-text, #111827);
}
.de-c-meta__item--strong .de-c-meta__text { color: var(--de-c-ink); font-weight: 700; }
.de-c-meta__item--volt .de-c-meta__text {
	background: rgba(255,184,0,0.14);
	color: var(--de-yellow-active, #F59E0B);
	padding: 0.2rem 0.5rem;
	font-weight: 700;
}
.de-c-meta__sep { color: var(--de-text-dim, #64748B); }

/* Dark-section inheritance — when a component sits inside a dark container. */
.de-dark .de-c-value,
.de-dark .de-c-step,
.de-dark .de-c-stat,
.de-dark .de-c-tile { background: transparent; border-color: var(--de-ink-4, #1E293B); }
.de-dark .de-c-value__title,
.de-dark .de-c-step__title,
.de-dark .de-c-stat__figure,
.de-dark .de-c-tile__title { color: #F8FAFC; }
.de-dark .de-c-value__body,
.de-dark .de-c-step__body,
.de-dark .de-c-stat__body,
.de-dark .de-c-tile__body,
.de-dark .de-c-meta__text { color: #CBD5E1; }
.de-dark .de-c-spec { color: #B3C5FF; }
.de-dark .de-c-spec__rule { background: var(--de-ink-4, #1E293B); }

/* =============================================================================
 * Responsive — component internals
 * -----------------------------------------------------------------------------
 * These live here rather than in the theme because Elementor enqueues this
 * stylesheet AFTER the theme's, so an equal-specificity rule in the theme
 * would lose. Sizes are explicit px: the host root font-size is not 16px, so a
 * 0.6875rem label resolves to ~10px and falls under the readable floor.
 * ========================================================================== */
@media (max-width: 767px) {

	/* Monospaced label layer -> 12px */
	.de-c-spec,
	.de-c-chip,
	.de-c-meta,
	.de-c-meta__sep,
	.de-c-value__code,
	.de-c-tile__cat,
	.de-c-stat__label,
	.de-c-tl__year,
	.de-c-step__label,
	.de-c-frame__caption { font-size: 12px; letter-spacing: 0.09em; }

	.de-c-frame--cap-badge .de-c-frame__primary   { font-size: 12px; }
	.de-c-frame--cap-badge .de-c-frame__secondary { font-size: 11px; }
	.de-c-meta__label { font-size: 12px; }

	/* Body layer -> 15px */
	.de-c-value__body,
	.de-c-step__body,
	.de-c-stat__body,
	.de-c-tile__body,
	.de-c-tl__body { font-size: 15px; line-height: 1.55; }

	/* Long spec strings get room to breathe. */
	.de-c-meta { gap: 0.4rem 0.75rem; }
	.de-c-meta--stacked .de-c-meta__item { flex-direction: column; align-items: flex-start; gap: 2px; }
	.de-c-meta--stacked .de-c-meta__label { min-width: 0; }

	/* Non-badge captions stack instead of squeezing onto one line. */
	.de-c-frame--cap-below .de-c-frame__caption,
	.de-c-frame--cap-overlay .de-c-frame__caption { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
	.de-c-frame__secondary { white-space: normal; }

	/* Cards tighten so copy is not squeezed into a narrow measure. */
	.de-c-value, .de-c-step, .de-c-stat { padding: 1rem; }
	.de-c-tile__caption { padding: 0.85rem 1rem; }
	.de-c-tile__media img { height: 210px !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
	/* Same readability floor as mobile — the mono layer resolves to ~10px at
	 * the host root size, so every label that uses it is raised to 11px. */
	.de-c-spec,
	.de-c-chip,
	.de-c-meta,
	.de-c-meta__sep,
	.de-c-meta__label,
	.de-c-value__code,
	.de-c-tile__cat,
	.de-c-stat__label,
	.de-c-tl__year,
	.de-c-step__label,
	.de-c-frame__caption,
	.de-c-frame__primary,
	.de-c-frame__secondary { font-size: 11px; }
}

/* =============================================================================
 * Fill-height frames
 * -----------------------------------------------------------------------------
 * In the image-left / copy-right bands the copy column is usually taller than
 * the fixed-height photo, leaving a ragged gap under the image. `de-frame-fill`
 * lets the frame stretch to whatever the row's tallest column is: the media
 * flexes, the caption stays pinned at the bottom, and the photo re-crops via
 * object-fit rather than distorting.
 *
 * Requires the parent row to use align-items: stretch (the default for
 * Elementor containers unless overridden).
 * ========================================================================== */
.de-frame-fill,
.de-frame-fill .elementor-widget-container { height: 100%; }

.de-frame-fill .de-c-frame {
	height: 100%;
	display: flex;
	flex-direction: column;
}
.de-frame-fill .de-c-frame__media {
	flex: 1 1 auto;
	min-height: 0;
}
.de-frame-fill .de-c-frame__media img {
	height: 100% !important;
	width: 100%;
	object-fit: cover;
}
/* The below-image caption bar keeps its natural height at the bottom. */
.de-frame-fill .de-c-frame--cap-below .de-c-frame__caption { flex: 0 0 auto; }

/* On mobile the columns stack, so a stretched image has no sibling to match —
 * fall back to the widget's own configured height. */
@media (max-width: 767px) {
	.de-frame-fill,
	.de-frame-fill .elementor-widget-container,
	.de-frame-fill .de-c-frame { height: auto; }
	.de-frame-fill .de-c-frame__media img { height: auto !important; }
}

/* =============================================================================
 * Review Card + Rating Summary
 * -----------------------------------------------------------------------------
 * Deliberately styled after the Google Places reviews widget rather than the
 * rest of this design system: the point of the block is that a visitor reads
 * it as Google's own reviews, so it keeps Google's rounded cards, amber stars
 * (#FBBC04) and blue link (#1A73E8) instead of the square, mono-labelled
 * treatment used elsewhere on the site.
 * ========================================================================== */
.de-c-review {
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
	padding: 22px;
	background: var(--de-c-canvas, #fff);
	border: 1px solid #DADCE0;
	border-radius: 8px;
}

.de-c-review__head { display: flex; align-items: center; gap: 12px; }

.de-c-review__avatar {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #1A73E8;
	color: #fff;
	font-family: var(--de-c-body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
}

.de-c-review__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.de-c-review__name {
	font-family: var(--de-c-body);
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--de-c-ink);
	line-height: 1.2;
}

.de-c-review__time,
.de-c-rating__count {
	font-family: var(--de-c-body);
	font-size: 0.8125rem;
	color: #70757A;
	line-height: 1.2;
}

/* Pushed to the far edge of the header row so the card reads left-to-right:
 * who wrote it, then where it came from. */
.de-c-review__g { width: 18px; height: 18px; margin-left: auto; flex: 0 0 auto; }

.de-c-review__stars,
.de-c-rating__stars { display: flex; gap: 2px; }

.de-c-star { width: 16px; height: 16px; fill: #DADCE0; flex: 0 0 auto; }
.de-c-star.is-on { fill: #FBBC04; }

.de-c-review__text {
	margin: 0;
	font-family: var(--de-c-body);
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--de-c-muted);
}

/* ---- Rating summary ---- */
.de-c-rating {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	padding: 16px 20px;
	background: var(--de-c-canvas, #fff);
	border: 1px solid #DADCE0;
	border-radius: 8px;
}

.de-c-rating__g { width: 32px; height: 32px; flex: 0 0 auto; }
.de-c-rating__body { display: flex; flex-direction: column; gap: 3px; }

.de-c-rating__label {
	font-family: var(--de-c-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #70757A;
}

.de-c-rating__row { display: flex; align-items: center; gap: 10px; }

.de-c-rating__score {
	font-family: var(--de-c-display);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	color: #E37400;
}

.de-c-rating__link {
	margin-left: auto;
	font-family: var(--de-c-body);
	font-size: 0.875rem;
	font-weight: 600;
	color: #1A73E8;
	text-decoration: none;
}
.de-c-rating__link:hover { text-decoration: underline; }

@media (max-width: 767px) {
	.de-c-rating { gap: 12px; }
	.de-c-rating__link { margin-left: 0; flex-basis: 100%; }
}
