/**
 * JT Services Page (/services/) — bespoke styles
 *
 * Scoped to `.jt-services-2026` body class so these rules can't bleed into
 * other JT templates. Used in conjunction with templates/jt-services.php.
 *
 * Source design: templates/2026 page templates/jacob_tyler_services_redesign.html
 *
 * Layout uses scoped-CSS Grid + clamp() typography rather than Tailwind utilities
 * because the responsive behavior is bespoke (asymmetric grid templates,
 * editorial-magazine label/content split, dark-band Philosophy section, etc.).
 *
 * The shared header.php navbar and footer.php contact CTA already cover those
 * regions of the page, so this file only styles main-content sections.
 */

/* =========================================================================
 *  Shared design tokens for this page
 *
 *  Brand palette only — no warm-cream / tan. The Our Services band uses
 *  --color-jt-gray (#EBEBEB) per JT brand guidelines.
 * ========================================================================= */
.jt-services-2026 {
	--jts-radius: 28px;
	--jts-line:   #dddddd;
	--jts-ease:   cubic-bezier(.16, 1, .3, 1);
	--jts-ink:    #0d0d0d;     /* matches --color-jt-dark / brand black */
	--jts-text:   #171717;
	--jts-muted:  #666666;
}

/* The shared header is fixed; give all <section> anchors a scroll-margin
 * so smooth-scrolling to #who-we-are etc. doesn't tuck the heading under
 * the navbar. */
.jt-services-2026 #who-we-are,
.jt-services-2026 #our-philosophy,
.jt-services-2026 #our-services {
	scroll-margin-top: 120px;
}

/* =========================================================================
 *  Common section primitives (eyebrow, section-title, content stack)
 *
 *  Typography matches DESIGN-SYSTEM §2.2 — `tracking-[-0.02em]` on every
 *  uppercase display heading; eyebrows use `tracking-widest` (0.15em);
 *  hero/section H1/H2 cap at 7.5rem / 5.4rem respectively.
 * ========================================================================= */
.jt-services-eyebrow {
	margin: 0 0 18px;
	color: var(--color-jt-red, #d71920);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.15em; /* matches --tracking-widest */
	line-height: 1;
	text-transform: uppercase;
}

.jt-services-section-title {
	margin: 0;
	color: var(--jts-ink);
	font-size: clamp(2.4rem, 5.5vw, 5.4rem); /* JT mega H2 cap = 5.4rem */
	font-weight: 900;
	line-height: 0.9;
	letter-spacing: -0.02em; /* JT standard */
	text-transform: uppercase;
}

.jt-services-section {
	padding-top: clamp(82px, 8vw, 124px);
	padding-bottom: clamp(82px, 8vw, 124px);
}

/* Editorial layout = two-column label (left) / content (right) */
.jt-services-editorial {
	display: grid;
	grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
	gap: clamp(48px, 8vw, 128px);
	align-items: start;
}
.jt-services-editorial__label {
	min-width: 0;
	position: relative;
	z-index: 2;
}
.jt-services-editorial__label .jt-services-section-title {
	max-width: 300px;
	overflow-wrap: normal;
}
.jt-services-editorial__content {
	min-width: 0;
	position: relative;
	z-index: 1;
	padding-top: 6px;
}
.jt-services-content-stack {
	display: grid;
	gap: 24px;
}

/* =========================================================================
 *  Hero
 * ========================================================================= */
/* Hero needs space above to clear the fixed navbar */
.jt-services-hero {
	padding-top: clamp(120px, 14vw, 180px);
	padding-bottom: clamp(40px, 5vw, 72px);
}

.jt-services-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
	gap: clamp(28px, 5vw, 80px);
	align-items: center;
}

.jt-services-hero__copy {
	max-width: 760px;
}

/* Big hero tagline. Sized to match the homepage hero exactly so the visual
 * weight is consistent across landing pages. The element is a <div role="presentation">
 * (not an <h1>) — see services.php for the SEO-driven hierarchy choice. */
.jt-services-hero__h1 {
	margin: 0;
	color: var(--jts-ink);
	font-size: clamp(2.5rem, 8vw, 7rem); /* matches jt-homepage.php hero exactly */
	font-weight: 900;
	line-height: 0.9;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

.jt-services-hero__lead {
	max-width: 620px;
	margin: 26px 0 0;
	color: #262626;
	font-size: clamp(1.125rem, 1.6vw, 1.5rem);
	line-height: 1.35;
	letter-spacing: -0.02em;
}

.jt-services-hero__partner {
	margin: 28px 0 0;
	display: grid;
	gap: 6px;
	color: var(--jts-ink);
	font-size: clamp(1.5rem, 2.4vw, 2.4rem);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.02em;
}

.jt-services-hero__media {
	border-radius: var(--jts-radius);
	overflow: hidden;
	background: #111;
	min-height: 540px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}
.jt-services-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 540px;
	object-fit: cover;
	object-position: center;
}

.jt-services-hero__links {
	margin-top: clamp(34px, 4vw, 48px);
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border-top: 1px solid var(--jts-line);
	border-bottom: 1px solid var(--jts-line);
}

.jt-services-hero__links a {
	min-height: 82px;
	padding: 20px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	border-right: 1px solid var(--jts-line);
	color: var(--jts-ink);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.15em; /* tracking-widest */
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.25s var(--jts-ease), color 0.25s var(--jts-ease);
}
.jt-services-hero__links a:last-child {
	border-right: 0;
}

/* Hero quick-link arrow — Lucide arrow-right icon. The <i> element gets
 * replaced by lucide.createIcons() with an <svg>; we style both selectors
 * so layout is consistent before and after the swap. */
.jt-services-hero__link-arrow {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	color: var(--color-jt-red, #d71920);
	transform-origin: center;
	transition: transform 0.3s var(--jts-ease), color 0.3s var(--jts-ease);
}
.jt-services-hero__link-arrow,
.jt-services-hero__link-arrow svg {
	display: inline-block;
	stroke-width: 2.5;
}
.jt-services-hero__link-arrow svg {
	width: 100%;
	height: 100%;
}

.jt-services-hero__links a:hover {
	background: var(--jts-ink);
	color: #fff;
}
.jt-services-hero__links a:hover .jt-services-hero__link-arrow {
	color: #fff;
	transform: rotate(-45deg);
}

/* =========================================================================
 *  Who We Are typography
 * ========================================================================= */
.jt-services-content-stack--who p {
	margin: 0;
}
.jt-services-content-stack--who p:first-child {
	max-width: 900px;
	color: var(--jts-ink);
	font-size: clamp(1.25rem, 2vw, 1.875rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
}
.jt-services-content-stack--who p:not(:first-child) {
	max-width: 760px;
	color: #353535;
	font-size: clamp(1.125rem, 1.35vw, 1.375rem);
	line-height: 1.5;
	letter-spacing: -0.02em;
}

/* =========================================================================
 *  Our Philosophy (dark band)
 * ========================================================================= */
.jt-services-philosophy {
	background: var(--jts-ink);
	color: #fff;
	min-height: clamp(520px, 52vw, 700px);
	display: flex;
	align-items: center;
}
/* The flex parent vertically-centers content within the 700px min-height,
 * but `mx-auto` in a flex item collapses to the item's intrinsic width.
 * Force the inner max-w-7xl wrapper to fill the flex track so its content
 * starts at the same x as the navbar (alignment to logo edge). */
.jt-services-philosophy > .max-w-7xl {
	width: 100%;
}
.jt-services-philosophy .jt-services-eyebrow,
.jt-services-philosophy .jt-services-section-title {
	color: #fff;
}
/* Philosophy stacks VERTICALLY (title above content) so the long word
 * "PHILOSOPHY" has room to breathe at full type scale. The side-by-side
 * editorial layout (used by other sections) crammed it against the body
 * copy at <1500px viewports. */
.jt-services-philosophy .jt-services-editorial {
	grid-template-columns: 1fr;
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
}
.jt-services-philosophy .jt-services-editorial__label .jt-services-section-title {
	max-width: none;
}
/* Philosophy paragraphs span the full container (1440px) since the section
 * is vertically stacked. Caps were inherited from the original side-by-side
 * editorial layout where they made sense; once stacked they were forcing
 * the body copy to occupy only half the band. */
.jt-services-content-stack--philosophy p {
	margin: 0;
}
.jt-services-content-stack--philosophy p:first-child {
	color: #fff;
	font-size: clamp(1.75rem, 2.8vw, 2.5rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
}
.jt-services-content-stack--philosophy p:not(:first-child) {
	color: rgba(255, 255, 255, 0.72);
	font-size: clamp(1.125rem, 1.35vw, 1.375rem);
	line-height: 1.5;
	letter-spacing: -0.02em;
}

/* =========================================================================
 *  Our Services (cream band with grouped lists)
 * ========================================================================= */
.jt-services-services {
	background: var(--color-jt-gray, #EBEBEB);
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.jt-services-services__head {
	display: grid;
	grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
	gap: clamp(30px, 6vw, 90px);
	align-items: end;
	margin-bottom: clamp(40px, 5vw, 64px);
}

.jt-services-services__head-image {
	border-radius: var(--jts-radius);
	overflow: hidden;
	background: #111;
	min-height: 320px;
	box-shadow: 0 26px 70px rgba(0, 0, 0, 0.12);
}
.jt-services-services__head-image img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 320px;
	object-fit: cover;
	object-position: center;
}

.jt-services-service-groups {
	border-top: 1px solid rgba(0, 0, 0, 0.18);
}

.jt-services-service-group {
	display: grid;
	grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
	gap: clamp(24px, 5vw, 80px);
	padding: 34px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.jt-services-service-group h3 {
	margin: 0;
	color: var(--jts-ink);
	font-size: clamp(1.4rem, 2.2vw, 2.25rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

.jt-services-service-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.jt-services-service-list a {
	min-height: 96px;
	padding: 20px 22px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;          /* vertical-center text + arrow */
	justify-content: space-between;
	gap: 18px;
	color: var(--jts-ink);
	text-decoration: none;
	transition:
		transform 0.25s var(--jts-ease),
		background 0.25s var(--jts-ease),
		color 0.25s var(--jts-ease),
		border-color 0.25s var(--jts-ease);
}
.jt-services-service-list a span {
	max-width: 360px;
	font-size: clamp(1.125rem, 1.7vw, 1.5rem);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: -0.02em;
}
/* Red disc that wraps the Lucide arrow icon. The whole disc rotates 45°
 * on hover — since the disc is a perfect circle, only the arrow inside
 * appears to rotate, but pivoting the wrapper keeps the geometry exact. */
.jt-services-arrow-circle {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--color-jt-red, #d71920);
	color: #fff;
	transform-origin: center;
	transition: transform 0.3s var(--jts-ease), background 0.3s var(--jts-ease);
}
/* Lucide swaps the <i> for <svg> at runtime — style both forms. The
 * `stroke-width: 2.75` makes the arrow noticeably thicker than the
 * default 2 so it reads cleanly inside the small red disc. */
.jt-services-arrow-circle i,
.jt-services-arrow-circle svg {
	width: 18px;
	height: 18px;
	stroke-width: 2.75;
	display: block;
}
.jt-services-service-list a:hover {
	transform: translateY(-2px);
	background: var(--jts-ink);
	color: #fff;
	border-color: var(--jts-ink);
}
/* Rotate the wrapper 45° counter-clockwise so → becomes ↗ (points upper-right)
 * — visual cue that this link goes deeper / outward. */
.jt-services-service-list a:hover .jt-services-arrow-circle {
	transform: rotate(-45deg);
}

/* =========================================================================
 *  Responsive
 * ========================================================================= */
@media (max-width: 1120px) {
	.jt-services-hero__grid,
	.jt-services-editorial,
	.jt-services-philosophy .jt-services-editorial,
	.jt-services-services__head,
	.jt-services-service-group {
		grid-template-columns: 1fr;
	}

	.jt-services-editorial__label .jt-services-section-title,
	.jt-services-philosophy .jt-services-editorial__label .jt-services-section-title {
		max-width: none;
	}

	.jt-services-philosophy {
		min-height: auto;
	}
}

@media (max-width: 760px) {
	.jt-services-section {
		padding-top: 64px;
		padding-bottom: 64px;
	}

	.jt-services-hero__links,
	.jt-services-service-list {
		grid-template-columns: 1fr;
	}

	.jt-services-hero__links a {
		border-right: 0;
		border-bottom: 1px solid var(--jts-line);
	}
	.jt-services-hero__links a:last-child {
		border-bottom: 0;
	}

	.jt-services-hero__media,
	.jt-services-hero__media img {
		min-height: 380px;
	}
}
