/* ==========================================================================
   Base: reset, typography, layout primitives, motion
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--jdc-header-h) + 24px);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--jdc-marble);
	color: var(--jdc-ink);
	font-family: var(--jdc-font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--jdc-crimson); text-decoration: none; transition: color .2s; }
a:hover { color: var(--jdc-crimson-deep); }

h1, h2, h3, h4, blockquote {
	font-family: var(--jdc-font-heading);
	font-weight: 500;
	color: var(--jdc-ink);
	margin: 0;
}
p { margin: 0; }

:focus-visible { outline: var(--jdc-focus); outline-offset: 3px; }
.jdc-main:focus { outline: none; }

.screen-reader-text,
.jdc-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.jdc-skip {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	padding: 12px 20px; border-radius: var(--jdc-r-pill);
	background: var(--jdc-ink); color: var(--jdc-marble); font-weight: 500;
	transition: top .2s var(--jdc-ease);
}
.jdc-skip:focus { top: 16px; color: var(--jdc-marble); }

/* --------------------------------------------------------------------------
   Type scale
   -------------------------------------------------------------------------- */

.jdc-h1 {
	font-size: var(--jdc-h1);
	font-weight: 500;
	line-height: .98;
	letter-spacing: -.025em;
	text-wrap: balance;
}
.jdc-h2 {
	font-size: var(--jdc-h2);
	font-weight: 500;
	line-height: 1.02;
	letter-spacing: -.02em;
	text-wrap: balance;
}
.jdc-h3 {
	font-size: var(--jdc-h3);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -.01em;
}
.jdc-h1 em, .jdc-h2 em, .jdc-h3 em, .jdc-accent {
	font-style: italic;
	font-weight: 400;
	color: var(--jdc-crimson);
}

.jdc-lead {
	font-size: var(--jdc-lead);
	line-height: 1.55;
	color: var(--jdc-text);
	text-wrap: pretty;
}
.jdc-body {
	font-size: var(--jdc-body);
	line-height: 1.7;
	color: var(--jdc-text);
	text-wrap: pretty;
}
.jdc-small { font-size: var(--jdc-small); line-height: 1.6; color: var(--jdc-text); }

/* --------------------------------------------------------------------------
   Layout: container (1360) · content (1264) · bands · splits · grids
   -------------------------------------------------------------------------- */

.jdc-container {
	width: 100%;
	max-width: var(--jdc-container);
	margin-inline: auto;
	padding-inline: var(--jdc-gutter);
}
.jdc-content {
	width: 100%;
	max-width: calc(var(--jdc-content) + 2 * var(--jdc-gutter));
	margin-inline: auto;
	padding-inline: var(--jdc-gutter);
}

/* Full-width solid bands; alternate Marble ⇄ Sand. */
.jdc-band { padding-block: var(--jdc-section-y); }
.jdc-band--marble { background: var(--jdc-marble); }
.jdc-band--sand { background: var(--jdc-sand); }
.jdc-band--ink { background: var(--jdc-ink); color: var(--jdc-dark-heading); }
.jdc-band--espresso { background: var(--jdc-espresso); color: var(--jdc-dark-heading); }
.jdc-band--ink h2, .jdc-band--espresso h2 { color: var(--jdc-white); }
.jdc-band--ink .jdc-body, .jdc-band--espresso .jdc-body { color: var(--jdc-dark-text); }

/* Two columns that stack under ~900px. Always top-aligned (kit rule). */
.jdc-split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: 32px var(--jdc-split-gap);
	align-items: end;
}
.jdc-split--top { align-items: start; }

/* Grids set by width so rows stay full: 3 / 2 / 1. */
.jdc-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 680px) { .jdc-grid--2, .jdc-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .jdc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.jdc-section-head { margin-bottom: 44px; }
.jdc-section-head .jdc-h2 { margin-top: 20px; }
.jdc-section-head--row {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px;
	margin-bottom: 36px;
}
.jdc-section-head--row .jdc-h2 { margin-top: 14px; }

.jdc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/*
 * Heading row (global rule): eyebrow on its own line, then the heading and its side text
 * start on the same line. Markup:
 *   <div class="jdc-headrow"> eyebrow
 *     <div class="jdc-headrow__grid"> <h2 class="jdc-h2">…</h2> <div class="jdc-headrow__side">…</div> </div>
 *   </div>
 */
.jdc-headrow > .jdc-eyebrow { margin-bottom: 20px; }
.jdc-headrow__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: 20px var(--jdc-split-gap);
	align-items: start;
}
.jdc-headrow__grid > .jdc-h2 { margin: 0; }
/* Nudge the side text so its first line meets the heading's cap height. */
@media (min-width: 960px) { .jdc-headrow__side { padding-top: 10px; } }

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes jdcRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes jdcPulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.4); opacity: 0; } }

/* Scroll reveal (main.js adds .is-pending then .is-visible). */
[data-reveal].is-pending { opacity: 0; transform: translateY(24px); }
[data-reveal].is-visible {
	opacity: 1; transform: none;
	transition: opacity .8s var(--jdc-ease), transform .8s var(--jdc-ease);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
	[data-reveal].is-pending { opacity: 1; transform: none; }
}

@media print {
	.jdc-utility, .jdc-header, .jdc-float, .jdc-progress, .jdc-footer { display: none !important; }
	[data-reveal] { opacity: 1 !important; transform: none !important; }
}
