/*
 * JT 2026 Blog Archive Stylesheet
 * Loads only on pages using the `jt-blog-archive.php` template.
 * Source mockup: templates/2026 page templates/jacob_tyler_blog_archive_redesign.html
 *
 * Scoped under .jt-archive-2026 to avoid collisions with the rest of the site.
 * Tokens reuse the same JT palette as single-post.css for visual continuity.
 */

.jt-archive-2026 {
	--jt-red: #d71920;
	--jt-black: #080808;
	--jt-charcoal: #171717;
	--jt-ink: #242424;
	--jt-muted: #686868;
	--jt-line: #deded8;
	--jt-soft: #f4f4f0;
	--jt-white: #ffffff;
	--jt-radius: 22px;
	--jt-ease: cubic-bezier(.2, .8, .2, 1);
	--jt-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--jt-ink);
	font-family: var(--jt-sans);
}

.jt-archive-2026 a { color: inherit; text-decoration: none; }
.jt-archive-2026 a:hover { color: var(--jt-red); }

/* ======================================================================
   Navbar contrast on dark-hero pages.
   The navbar partial defaults its logo + Talk to Us + hamburger lines to
   the dark variant (red logo, dark text). On pages where the navbar
   overlaps a dark hero (this archive's hero, vlog hero, single-post
   hero), those default colors disappear. We flip them to white-mode while
   the navbar is unscrolled (no `bg-white/95` class) and the menu is
   closed (no `is-menu-open` class). After scroll past 50px the navbar
   gains `bg-white/95` and the dark variant is correct again.

   This same block is scoped under .jt-single-post-2026 in single-post.css.
   When you build a new dark-hero page, copy these rules into the new
   page's scoped stylesheet (or refactor into a shared dark-hero stylesheet).
   See DESIGN-SYSTEM.md §3.1 / §7 for the rationale.

   The `\/` is the CSS-escape for the `/` in `bg-white/95` (Tailwind
   class name with a slash).
   ====================================================================== */
.jt-archive-2026 #jt-navbar:not(.bg-white\/95):not(.is-menu-open) .jt-navbar-logo--red {
	opacity: 0;
}
.jt-archive-2026 #jt-navbar:not(.bg-white\/95):not(.is-menu-open) .jt-navbar-logo--white {
	opacity: 1;
}
.jt-archive-2026 #jt-navbar:not(.bg-white\/95):not(.is-menu-open) #jt-talk-link,
.jt-archive-2026 #jt-navbar:not(.bg-white\/95):not(.is-menu-open) .jt-navbar-tagline-text {
	color: #fff;
}
.jt-archive-2026 #jt-navbar:not(.bg-white\/95):not(.is-menu-open) .menu-line {
	background-color: #fff;
}

/* Mobile-menu flyout: menu items default to white. The body color cascade
   on jt-archive-2026 (--jt-ink #242424) otherwise wins over the partial's
   .jt-flyout-link default and renders the menu items as dark gray on the
   dark overlay — invisible. */
.jt-archive-2026 #jt-mobile-menu,
.jt-archive-2026 #jt-mobile-menu .jt-flyout-link,
.jt-archive-2026 #jt-mobile-menu p,
.jt-archive-2026 #jt-mobile-menu a:not(.jt-btn-primary):not(.jt-btn-outline-light) {
	color: #fff;
}
.jt-archive-2026 #jt-mobile-menu .jt-flyout-link:hover,
.jt-archive-2026 #jt-mobile-menu a:hover {
	color: var(--jt-red);
}

/* The footer partial uses .reveal-on-scroll which starts at opacity 0 and
   animates in via IntersectionObserver in homepage.js. We DO enqueue
   homepage.js below as the same belt-and-suspenders this serves. Without
   the JS the contact-form section stays invisible — this CSS keeps it
   readable as a hard fallback. */
.jt-archive-2026 .reveal-on-scroll {
	opacity: 1;
	transform: none;
}

/* ============== Hero ============== */
.jt-archive-2026 .jt-archive-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(120px, 14vw, 200px) 0 clamp(56px, 8vw, 96px);
	background: var(--jt-black);
	color: var(--jt-white);
	border-bottom: 1px solid rgba(255,255,255,.08);
	isolation: isolate;
}

/* Full-bleed background image — uses the hero image (people photo by default).
   Inline `style` on the element sets the URL via `background-image`. */
.jt-archive-2026 .jt-archive-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center 30%;
	background-repeat: no-repeat;
	z-index: 0;
	opacity: 0.7;
	filter: saturate(0.95) contrast(1.04);
	transform: scale(1.02);
}

/* Heavy gradient overlay so the white headline reads against the image.
   Bottom-darker so it transitions cleanly into the white "Brand Thinking"
   section below. */
.jt-archive-2026 .jt-archive-hero__bg-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.65) 55%, rgba(8,8,8,0.92) 100%),
		linear-gradient(90deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.20) 60%, rgba(8,8,8,0.55) 100%);
	z-index: 1;
}

.jt-archive-2026 .jt-archive-hero__inner {
	position: relative;
	z-index: 2;
	width: min(calc(100% - 40px), 90rem); /* 1440px — same width as single-post hero */
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
	gap: clamp(34px, 6vw, 86px);
	align-items: end;
}

.jt-archive-2026 .jt-archive-hero__copy { min-width: 0; }

.jt-archive-2026 .jt-archive-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 26px;
	color: var(--jt-red);
	font-size: 0.74rem;
	font-weight: 900;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.jt-archive-2026 .jt-archive-hero__eyebrow::before {
	content: "";
	width: 36px;
	height: 2px;
	background: currentColor;
}

.jt-archive-2026 .jt-archive-hero__title {
	max-width: 920px;
	margin: 0;
	color: var(--jt-white);
	font-size: clamp(3rem, 8.5vw, 7.5rem);
	line-height: 0.86;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	font-weight: 900;
	text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

.jt-archive-2026 .jt-archive-hero__lede {
	max-width: 720px;
	margin: 28px 0 0;
	color: rgba(255,255,255,0.86);
	font-size: clamp(1.05rem, 1.45vw, 1.42rem);
	line-height: 1.55;
}

.jt-archive-2026 .jt-archive-hero__panel {
	position: relative;
	overflow: hidden;
	min-height: 460px;
	border-radius: var(--jt-radius);
	border: 1px solid rgba(0,0,0,.12);
	background: var(--jt-black);
	box-shadow: 0 26px 70px rgba(0,0,0,.18);
	isolation: isolate;
}

.jt-archive-2026 .jt-archive-hero__panel img {
	width: 100%;
	height: 100%;
	min-height: 460px;
	object-fit: cover;
	opacity: 0.78;
	filter: saturate(0.95) contrast(1.03);
	transform: scale(1.02);
	transition: transform 1.2s var(--jt-ease);
}

.jt-archive-2026 .jt-archive-hero__panel:hover img { transform: scale(1.06); }

.jt-archive-2026 .jt-archive-hero__panel-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.85) 88%);
	z-index: 1;
}

.jt-archive-2026 .jt-archive-hero__panel-content {
	position: absolute;
	inset: auto 28px 28px 28px;
	z-index: 2;
	color: #fff;
}

.jt-archive-2026 .jt-archive-hero__panel-content h2 {
	margin: 0;
	color: #fff;
	font-size: clamp(2rem, 3.4vw, 3.4rem);
	line-height: 0.92;
	letter-spacing: -0.02em; /* matches global -0.02em standard for display headings */
	text-transform: uppercase;
	font-weight: 900;
}

.jt-archive-2026 .jt-archive-hero__panel-content p {
	margin: 8px 0 0;
	color: rgba(255,255,255,0.78);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.10em;
	text-transform: uppercase;
}

.jt-archive-2026 .jt-archive-hero__quick-link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 900;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.jt-archive-2026 .jt-archive-hero__quick-link:hover { color: #fff; }

.jt-archive-2026 .jt-archive-hero__quick-link span {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--jt-red);
	color: #fff;
	font-size: 1rem;
	transition: transform 0.22s var(--jt-ease), background 0.22s var(--jt-ease);
}

.jt-archive-2026 .jt-archive-hero__quick-link:hover span {
	transform: translateX(5px);
}

/* ============== Post grid ============== */
.jt-archive-2026 .jt-archive-list {
	padding: clamp(60px, 8vw, 110px) 0;
	background: #fff;
}

.jt-archive-2026 .jt-archive-list__inner {
	width: min(calc(100% - 40px), 90rem);
	margin: 0 auto;
}

.jt-archive-2026 .jt-archive-list__top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 28px;
	align-items: end;
	margin-bottom: clamp(28px, 5vw, 54px);
}

.jt-archive-2026 .jt-archive-list__title {
	margin: 0;
	color: var(--jt-black);
	font-size: clamp(2.4rem, 5.5vw, 5.4rem);
	line-height: 0.92;
	letter-spacing: -0.02em; /* matches global -0.02em standard for display headings */
	text-transform: uppercase;
	font-weight: 900;
}

.jt-archive-2026 .jt-archive-list__note {
	margin: 12px 0 0;
	color: var(--jt-muted);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.10em;
	text-transform: uppercase;
}

.jt-archive-2026 .jt-archive-list__cta {
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-width: min(380px, 100%);
	padding: 18px 22px;
	border: 1px solid var(--jt-line);
	border-radius: 999px;
	background: var(--jt-soft);
	color: var(--jt-black);
	font-size: 0.74rem;
	font-weight: 900;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	transition: background 0.22s var(--jt-ease), color 0.22s var(--jt-ease), border-color 0.22s var(--jt-ease);
}

.jt-archive-2026 .jt-archive-list__cta:hover {
	color: #fff;
	background: var(--jt-black);
	border-color: var(--jt-black);
}

.jt-archive-2026 .jt-archive-list__cta span {
	color: var(--jt-red);
	font-size: 1.1rem;
	line-height: 1;
	transition: transform 0.22s var(--jt-ease), color 0.22s var(--jt-ease);
}

.jt-archive-2026 .jt-archive-list__cta:hover span {
	color: #fff;
	transform: translateX(4px);
}

/* Post grid: 3-col with the first card spanning 2 columns. */
.jt-archive-2026 .jt-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

/* Each card uses its featured image as the background via a CSS variable
   set inline (--jt-card-bg). Layered: bg image -> dark shade -> content. */
.jt-archive-2026 .jt-post-card {
	position: relative;
	min-height: 360px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: clamp(24px, 3vw, 36px);
	border: 1px solid var(--jt-line);
	border-radius: var(--jt-radius);
	background: var(--jt-charcoal);
	color: #fff;
	overflow: hidden;
	isolation: isolate;
	transition: transform 0.32s var(--jt-ease), box-shadow 0.32s var(--jt-ease), border-color 0.32s var(--jt-ease);
}

.jt-archive-2026 .jt-post-card--large {
	grid-column: span 2;
	min-height: 460px;
}

.jt-archive-2026 .jt-post-card__bg {
	position: absolute;
	inset: 0;
	background-image: var(--jt-card-bg, none);
	background-size: cover;
	background-position: center;
	transition: transform 0.6s var(--jt-ease), filter 0.4s var(--jt-ease);
	z-index: 0;
	transform: scale(1.02);
}

/* Default state is heavy enough to read white H3 over any image, including
   ones with text/typography in them (the JT case-study screenshots in
   particular). Hover state goes deeper still. */
.jt-archive-2026 .jt-post-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.78) 55%, rgba(8,8,8,0.94) 100%);
	z-index: 1;
	transition: background 0.32s var(--jt-ease);
}

/* Red accent bar at the top, animates in on hover (matches mockup). */
.jt-archive-2026 .jt-post-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 5px;
	background: var(--jt-red);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.32s var(--jt-ease);
	z-index: 3;
}

.jt-archive-2026 .jt-post-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 28px 70px rgba(0,0,0,0.22);
	border-color: rgba(215,25,32,0.4);
}

.jt-archive-2026 .jt-post-card:hover::before { transform: scaleX(1); }

.jt-archive-2026 .jt-post-card:hover .jt-post-card__bg {
	transform: scale(1.08);
	filter: saturate(1.05);
}

.jt-archive-2026 .jt-post-card:hover .jt-post-card__shade {
	background: linear-gradient(180deg, rgba(8,8,8,0.45) 0%, rgba(8,8,8,0.70) 55%, rgba(8,8,8,0.96) 100%);
}

.jt-archive-2026 .jt-post-card__top {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.jt-archive-2026 .jt-post-card__number {
	color: var(--jt-red);
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.jt-archive-2026 .jt-post-card__cat {
	color: rgba(255,255,255,0.85);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	padding: 5px 10px;
	border: 1px solid rgba(255,255,255,0.25);
	border-radius: 999px;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.jt-archive-2026 .jt-post-card__link {
	position: relative;
	z-index: 2;
	color: inherit;
	display: block;
}

.jt-archive-2026 .jt-post-card__link:hover { color: inherit; }

.jt-archive-2026 .jt-post-card h3 {
	margin: 26px 0 0;
	color: #fff;
	font-size: clamp(1.6rem, 2.4vw, 2.4rem);
	line-height: 1.05;
	letter-spacing: -0.02em; /* global -0.02em display standard */
	font-weight: 800;
}

.jt-archive-2026 .jt-post-card--large h3 {
	font-size: clamp(2rem, 3.6vw, 3.6rem);
	line-height: 0.98;
	letter-spacing: -0.02em; /* global -0.02em display standard */
}

.jt-archive-2026 .jt-post-card .jt-read-more {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 900;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.jt-archive-2026 .jt-post-card .jt-read-more em {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--jt-red);
	color: #fff;
	font-style: normal;
	transition: transform 0.22s var(--jt-ease);
}

.jt-archive-2026 .jt-post-card:hover .jt-read-more em {
	transform: translateX(5px);
}

/* When a card has NO featured image, the dark background shows through —
   keep the layout integrity. The shade gradient still gives depth. */
.jt-archive-2026 .jt-post-card:not([style*="--jt-card-bg"]) .jt-post-card__bg {
	background-image: linear-gradient(135deg, rgba(8,8,8,0.92), rgba(40,40,40,0.92));
}

.jt-archive-2026 .jt-archive-list__more {
	display: flex;
	justify-content: center;
	margin-top: 36px;
}

.jt-archive-2026 .jt-archive-list__more-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 0 36px;
	border: 1px solid var(--jt-black);
	border-radius: 999px;
	background: transparent;
	color: var(--jt-black);
	font-size: 0.74rem;
	font-weight: 900;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	transition: background 0.22s var(--jt-ease), color 0.22s var(--jt-ease), transform 0.22s var(--jt-ease);
}

.jt-archive-2026 .jt-archive-list__more-btn:hover {
	color: #fff;
	background: var(--jt-black);
	transform: translateY(-2px);
}

.jt-archive-2026 .jt-archive-list__more-btn[disabled],
.jt-archive-2026 .jt-archive-list__more-btn.is-loading {
	cursor: progress;
	opacity: 0.65;
	transform: none;
}

.jt-archive-2026 .jt-archive-list__more-btn.is-loading:hover {
	background: transparent;
	color: var(--jt-black);
	transform: none;
}

.jt-archive-2026 .jt-archive-list__empty {
	text-align: center;
	color: var(--jt-muted);
	font-size: 1rem;
	padding: 60px 0;
}

/* ============== Responsive ============== */
@media (max-width: 1024px) {
	.jt-archive-2026 .jt-archive-hero__inner {
		grid-template-columns: 1fr;
	}
	.jt-archive-2026 .jt-archive-hero__panel {
		min-height: 360px;
	}
	.jt-archive-2026 .jt-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.jt-archive-2026 .jt-post-card--large {
		grid-column: span 2;
	}
	.jt-archive-2026 .jt-archive-list__top {
		grid-template-columns: 1fr;
	}
	.jt-archive-2026 .jt-archive-list__cta {
		min-width: 0;
		max-width: 480px;
	}
}

@media (max-width: 640px) {
	.jt-archive-2026 .jt-post-grid {
		grid-template-columns: 1fr;
	}
	.jt-archive-2026 .jt-post-card--large {
		grid-column: span 1;
	}
	.jt-archive-2026 .jt-archive-hero__title {
		font-size: clamp(2.4rem, 14vw, 4rem);
	}
}
