/****** FILE: themes/gamry/css/pages/ResourcesPage.css *****/
/* White Papers — a downloads listing under the Resources hub.

   Deliberately the same card language as css/pages/HubPage.css: navy title, #4b565d body,
   mono chip, 11px radius, 1px #e6eaec border, grid `gap` only. This page is a child of that hub
   and a reader arrives straight from it, so a second card style would read as a different site.
   What differs is what the card carries — real cover artwork and a real file — not how it looks.

   Colour values are the tested ones from the landing-page handoff. #5f6b72 is the lightest muted
   grey that clears 4.5:1 on #fbfbfa at these sizes; do not lighten it. */

.wp-page { max-width: 1040px; margin: 0 auto; padding: 8px 20px 48px; box-sizing: border-box; }

/* The breadcrumb sits in the shared .rd-cp shell, whose max-width is wider than this column;
   pin it so it lines up with the heading it belongs to. */
.rd-cp--hub .rd-cp-headmax { max-width: 1040px; margin-inline: auto; padding: 0 20px; box-sizing: border-box; }

/* ---- Head ---- */

.wp-page .wp-head { margin-bottom: 30px; }

.wp-page .wp-eyebrow {
	font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #003e69;
	margin: 0 0 10px;
}

.wp-page .wp-h1 {
	font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
	font-size: 31px;
	line-height: 1.13;
	letter-spacing: -0.015em;
	color: #17242b;
	margin: 0 0 8px;
}

.wp-page .wp-intro { font-size: 15.5px; line-height: 1.6; color: #37444c; max-width: 640px; }
.wp-page .wp-intro p { margin: 0 0 10px; color: #37444c; }
.wp-page .wp-intro p:last-child { margin-bottom: 0; }
.wp-page .wp-bottom { margin-top: 34px; }

/* ---- Grid ----
   264px minimum matches the tagged variant on the Resources hub, so a reader moving from the hub
   to this page sees cards of the same size. Grid `gap` only — per-card margins fight auto-fill
   track sizing and leave uneven gutters on the last row. */

.wp-page .wp-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(264px, 100%), 1fr));
	gap: 14px;
}

/* ---- Card ----
   The whole card is the link, so the whole card is the focus target. */

.wp-page .wp-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid #e6eaec;
	border-radius: 11px;
	overflow: hidden;
	text-decoration: none !important;
	color: #17242b !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wp-page .wp-card:hover,
.wp-page .wp-card:focus-visible {
	border-color: #003e69;
	box-shadow: 0 8px 22px rgba(23, 36, 43, 0.07);
}
.wp-page .wp-card:focus-visible { outline: 3px solid #003e69; outline-offset: 2px; }

/* ---- Cover ----
   A document cover, so `contain` on white rather than `cover`: cropping a white paper's cover
   cuts off its title, which is the one thing on it worth reading. The fixed aspect keeps a
   portrait A4 cover and a landscape one in the same box without the grid going ragged. */

.wp-page .wp-cover {
	display: block;
	/* 3:4 — these are document covers, so the box is portrait. An earlier 4/3 here was dead:
	   the <img> carries its own width/height attributes and the span's height was auto, so the
	   intrinsic ratio won and the declaration did nothing. Ratio lives in one place now. */
	aspect-ratio: 3 / 4;
	/* Capped and centred rather than full-bleed. Without the cap the cover peaks at 494 CSS px
	   in the one-column layout (measured at a 580px viewport, not at desktop — the widest card
	   is always the narrow one), which would demand a ~990px asset for a thumbnail. Bounding it
	   keeps the requested image small and stops a phone downloading a near-full-size scan. */
	width: 100%;
	max-width: 200px;
	margin: 0 auto;
	background: #fff;
	/* No divider rule: the box is capped at 200px inside a ~264px card, so a border here reads as
	   a short line floating in the card rather than as a separator. The cover's own edge and the
	   gap below it do the separating. */
	padding: 14px 12px 2px;
	box-sizing: border-box;
}
.wp-page .wp-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* ---- Body ---- */

.wp-page .wp-body {
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 15px 17px 16px;
	flex: 1 1 auto;
}

.wp-page .wp-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.wp-page .wp-title {
	font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.25;
	letter-spacing: -0.005em;
	color: #003e69;
}
.wp-page .wp-card:hover .wp-title { color: #00567f; }

.wp-page .wp-chip {
	flex: 0 0 auto;
	margin-top: 2px;
	font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 9.5px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #00567f;
	background: #eef4f8;
	padding: 4px 7px;
	border-radius: 4px;
	white-space: nowrap;
}

.wp-page .wp-desc {
	font-size: 13.5px;
	line-height: 1.5;
	color: #4b565d;
	text-wrap: pretty;
}

/* Pushed to the bottom so the action sits on one line across a ragged row of cards. */
.wp-page .wp-action {
	margin-top: auto;
	padding-top: 4px;
	font-size: 13.5px;
	font-weight: 600;
	color: #003e69;
}
.wp-page .wp-card:hover .wp-arrow { display: inline-block; transform: translateX(2px); }
.wp-page .wp-arrow { transition: transform 0.15s ease; }

@media (prefers-reduced-motion: reduce) {
	.wp-page .wp-card, .wp-page .wp-arrow { transition: none; }
	.wp-page .wp-card:hover .wp-arrow { transform: none; }
}

/* ---- Narrow ----
   320px is the WCAG 2.2 reflow floor the rest of this site is held to. */

@media (max-width: 560px) {
	.wp-page .wp-grid { grid-template-columns: 1fr; }
	.wp-page .wp-h1 { font-size: 25px; }
	.wp-page .wp-card-head { flex-wrap: wrap; }
}

