/* jab-core-blocks — per-block styles. */

/* Block: hero — v0.4.5 navy editorial CRO refresh.
   Was: pearl bg, generic blog hero. Now: navy panel + pearl Cormorant title +
   gold accent watermark + gold filled / pearl outline pill CTAs.
   Mirrors the Newsletter Signup navy inversion so editorial CTAs read as a
   coherent system across the article (hero + newsletter both navy = brand
   anchors, body content lives on pearl). */
.jab-hero {
	background: var(--brand-primary);
	color: var(--brand-text-on-dark);
	padding: var(--brand-space-8) var(--brand-space-6);
	border-radius: var(--brand-radius-lg);
	margin-block: var(--brand-space-6);
	box-shadow: 0 4px 18px rgba(14, 31, 58, 0.18);
	position: relative;
	overflow: hidden;
}
.jab-hero--variant-boxed { padding: var(--brand-space-7) var(--brand-space-6); }

.jab-hero__grid {
	display: grid;
	grid-template-columns: 1fr;             /* default: full-width text */
	gap: var(--brand-space-5);
	align-items: center;
	position: relative;
	z-index: 1;
}
.jab-hero__grid:has(.jab-hero__image img) {
	grid-template-columns: 55% 45%;         /* image present → 2-col text+image */
	gap: var(--brand-space-7);
}
@media (max-width: 768px) {
	.jab-hero__grid,
	.jab-hero__grid:has(.jab-hero__image img) {
		grid-template-columns: 1fr;
	}
}

.jab-hero__title {
	font-family: var(--brand-font-display);
	font-size: clamp(32px, 4.5vw, 56px);
	line-height: 1.1;
	color: var(--brand-text-on-dark);
	margin: 0 0 var(--brand-space-4);
	font-weight: 600;
	letter-spacing: -0.015em;
	text-wrap: balance;
}
/* Inline opening quote on title — same editorial signature as Newsletter. */
.jab-hero__title::before {
	content: "\201C";
	display: inline-block;
	font-family: var(--brand-font-display);
	color: var(--brand-accent);
	opacity: 0.55;
	font-size: 0.85em;
	font-weight: 600;
	margin-right: 0.06em;
	vertical-align: -0.05em;
}

.jab-hero__subtitle {
	font-family: var(--brand-font-display);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(18px, 1.8vw, 22px);
	color: var(--brand-text-on-dark);
	opacity: 0.92;
	margin: 0 0 var(--brand-space-5);
	max-width: 620px;
	line-height: 1.45;
}

.jab-hero__byline {
	font-family: var(--brand-font-body);
	font-size: 14px;
	color: var(--brand-text-on-dark-muted);
	margin: 0 0 var(--brand-space-6);
	letter-spacing: 0.04em;
}

.jab-hero__buttons { display: flex; gap: var(--brand-space-3); flex-wrap: wrap; }

/* Hero CTAs: filled = gold (primary), outline = pearl-on-navy (secondary). */
.jab-hero .jab-btn--filled {
	background: var(--brand-accent);
	color: var(--brand-primary-dark);
}
.jab-hero .jab-btn--filled:hover,
.jab-hero .jab-btn--filled:focus {
	background: var(--gold-600, #b08653);
	color: #ffffff;
}
.jab-hero .jab-btn--outline {
	background: transparent;
	color: var(--brand-text-on-dark);
	border-color: var(--brand-text-on-dark);
	border-width: 2px;
}
.jab-hero .jab-btn--outline:hover,
.jab-hero .jab-btn--outline:focus {
	background: var(--brand-text-on-dark);
	color: var(--brand-primary);
	border-color: var(--brand-text-on-dark);
}

.jab-hero__image img {
	max-width: 100%;
	height: auto;
	border-radius: var(--brand-radius-md);
	display: block;
	box-shadow: 0 10px 30px rgba(14, 31, 58, 0.35);
}

/* Block: author-bio — v0.4.2 editorial CRO refresh.
   Was: gold (--brand-accent) background with white text = tan-on-tan unreadable.
   Now: white surface card + navy heading + warm-grey body + navy outline pill CTAs.
   Trust-signal architecture: headshot LEFT, content RIGHT, dual CTAs as funnel
   exits (primary → credentials/about, secondary → recommended tools). */
.jab-author-bio {
	background: var(--brand-surface);
	color: var(--brand-text);
	border: 1px solid var(--brand-border-strong);
	border-radius: var(--brand-radius-lg);
	padding: var(--brand-space-7);
	box-shadow: var(--brand-shadow-sm);
	margin-block: var(--brand-space-7);
	position: relative;
}
.jab-author-bio::before {
	content: "";
	position: absolute;
	top: 0; left: 0; bottom: 0;
	width: 4px;
	background: var(--brand-accent);
	border-radius: var(--brand-radius-lg) 0 0 var(--brand-radius-lg);
}
/* Grid: default = single full-width column (no headshot wasted space).
   When a headshot IS present, becomes 1fr (content left) + 120px (headshot right).
   `:has()` detects the rendered <img> child, so the grid responds automatically
   to whether the bio has a headshot without needing PHP conditional classes. */
.jab-author-bio__grid { display: grid; grid-template-columns: 1fr; gap: var(--brand-space-6); align-items: start; }
.jab-author-bio__grid:has(.jab-author-bio__headshot img) { grid-template-columns: 1fr 120px; }
@media (max-width: 768px) {
	.jab-author-bio__grid,
	.jab-author-bio__grid:has(.jab-author-bio__headshot img) {
		grid-template-columns: 1fr;
		gap: var(--brand-space-4);
		text-align: center;
	}
}
.jab-author-bio__label {
	font-family: var(--brand-font-body);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sage-700, #5c6f63);
	font-weight: 600;
	margin: 0 0 var(--brand-space-2);
}
.jab-author-bio__name {
	font-family: var(--brand-font-display);
	font-size: clamp(22px, 2.5vw, 28px);
	font-weight: 600;
	color: var(--brand-primary);
	margin: 0 0 var(--brand-space-3);
	line-height: 1.2;
	letter-spacing: -0.01em;
}
.jab-author-bio__text {
	font-family: var(--brand-font-body);
	font-size: 17px;
	line-height: 1.6;
	color: var(--brand-text);                      /* v0.4.3: navy ink, not muted grey */
	margin: 0 0 var(--brand-space-5);
	max-width: 620px;
}
.jab-author-bio__buttons { display: flex; gap: var(--brand-space-3); flex-wrap: wrap; }
@media (max-width: 768px) { .jab-author-bio__buttons { justify-content: center; } }

/* v0.4.3: Author Bio buttons get a stronger 2px navy stroke (was 1px universal).
   Faint 1px outlines disappear on white-card surfaces; 2px reads as a deliberate
   trust-signal pill. Scoped to the bio block so other outline buttons keep their
   default treatment. */
.jab-author-bio .jab-btn--outline {
	border-width: 2px;
	border-color: var(--brand-primary);
	color: var(--brand-primary);
	font-weight: 600;
}
.jab-author-bio .jab-btn--outline:hover,
.jab-author-bio .jab-btn--outline:focus {
	background: var(--brand-primary);
	color: var(--brand-text-on-dark);
	border-color: var(--brand-primary);
}
.jab-author-bio__headshot img {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	display: block;
	object-fit: cover;
	border: 3px solid var(--brand-accent);
	box-shadow: var(--brand-shadow-md);
}
@media (max-width: 768px) {
	.jab-author-bio__headshot img { margin: 0 auto var(--brand-space-3); width: 96px; height: 96px; }
}
.jab-author-bio--variant-vertical { padding: var(--brand-space-5); }
.jab-author-bio--variant-vertical .jab-author-bio__grid { grid-template-columns: 1fr; text-align: center; }
.jab-author-bio--variant-vertical .jab-author-bio__headshot img { width: 80px; height: 80px; margin: 0 auto var(--brand-space-3); }

/* Block: key-takeaways */
.jab-key-takeaways { background: var(--brand-bg-callout); border-left: 5px solid var(--brand-success); border-radius: var(--brand-radius-sm); padding: var(--brand-space-5); }
.jab-key-takeaways__label { font-weight: var(--brand-font-weight-bold); text-transform: uppercase; letter-spacing: 0.05em; font-size: var(--brand-text-sm); color: var(--brand-text); margin: 0 0 var(--brand-space-3); }
.jab-key-takeaways__list { margin: 0; padding-left: var(--brand-space-5); color: var(--brand-text); line-height: var(--brand-line-height-body); }
.jab-key-takeaways__list li + li { margin-top: var(--brand-space-2); }

/* Block: affiliate-disclosure */
.jab-affiliate-disclosure { background: var(--brand-bg-callout); border-left: 4px solid var(--brand-primary); border-radius: var(--brand-radius-sm); padding: var(--brand-space-4); font-size: var(--brand-text-sm); color: var(--brand-text); margin-block: var(--brand-space-4); }
.jab-affiliate-disclosure p { margin: 0; }
.jab-affiliate-disclosure a { color: var(--brand-primary); text-decoration: underline; }

/* Block: equipment-callout */
.jab-equipment-callout { background: var(--brand-bg-light); border: 1px solid var(--brand-border); border-radius: var(--brand-radius-sm); padding: var(--brand-space-4); color: var(--brand-text); margin-block: var(--brand-space-4); }
.jab-equipment-callout a { color: var(--brand-primary); font-weight: var(--brand-font-weight-semibold); }

/* Block: comparison-table */
.jab-comparison-table { overflow-x: auto; margin-block: var(--brand-space-5); }
.jab-comparison-table__title { font-family: var(--brand-font-display); font-size: var(--brand-text-xl); margin: 0 0 var(--brand-space-3); color: var(--brand-text); }
.jab-comparison-table table { width: 100%; border-collapse: collapse; table-layout: fixed; border: 1px solid var(--brand-border-strong); }
.jab-comparison-table thead { background: var(--brand-primary); color: var(--brand-surface); }
.jab-comparison-table th, .jab-comparison-table td { padding: var(--brand-space-3) var(--brand-space-4); text-align: left; border-bottom: 1px solid var(--brand-border-strong); }
.jab-comparison-table tbody tr:nth-child(even) { background: var(--brand-bg-light); }

/* v0.4.0 editorial refresh — highlighted row becomes a featured-row treatment.
   Gold left-edge accent (4px), gold-tint background, navy ink, slight box-shadow
   leaking outside the row to suggest a "lifted card" within the table. */
.jab-comparison-table tbody tr.is-highlighted {
	background: color-mix(in srgb, var(--brand-accent) 12%, var(--brand-surface));
	font-weight: var(--brand-font-weight-semibold);
	color: var(--brand-primary);
	box-shadow: inset 4px 0 0 var(--brand-accent), 0 2px 8px rgba(212, 180, 131, 0.15);
	position: relative;
}
.jab-comparison-table tbody tr.is-highlighted td:first-child {
	font-family: var(--brand-font-display);
	font-size: var(--brand-text-lg);
	font-weight: 600;
}

/* Mobile: stacked-card layout (< 768px) — replaces horizontal scroll. */
@media (max-width: 768px) {
	.jab-comparison-table { overflow-x: visible; }
	.jab-comparison-table table { table-layout: auto; border: none; }
	.jab-comparison-table thead { position: absolute; left: -9999px; top: -9999px; }
	.jab-comparison-table tbody tr { display: block; margin-bottom: var(--brand-space-4); padding: var(--brand-space-4); background: var(--brand-surface); border: 1px solid var(--brand-border-strong); border-radius: var(--brand-radius-md); }
	.jab-comparison-table tbody tr:nth-child(even) { background: var(--brand-surface); }
	.jab-comparison-table tbody tr.is-highlighted { background: var(--brand-bg-callout); border-color: var(--brand-primary); border-width: 2px; }
	.jab-comparison-table td { display: flex; justify-content: space-between; align-items: baseline; gap: var(--brand-space-3); padding: var(--brand-space-2) 0; border-bottom: 1px solid var(--brand-border); text-align: right; }
	.jab-comparison-table td::before { content: attr(data-label); font-weight: var(--brand-font-weight-semibold); color: var(--brand-text-muted); font-size: var(--brand-text-sm); text-align: left; flex: 0 0 auto; }
	.jab-comparison-table td:first-child { display: block; font-family: var(--brand-font-display); font-size: var(--brand-text-lg); font-weight: var(--brand-font-weight-bold); color: var(--brand-text); text-align: left; padding: 0 0 var(--brand-space-3); margin-bottom: var(--brand-space-2); border-bottom: 2px solid var(--brand-border-strong); }
	.jab-comparison-table td:first-child::before { content: none; }
	.jab-comparison-table td:last-child { border-bottom: none; padding-bottom: 0; }
}
