/**
 * Applications page (page-applications.php). Enqueued only for the applications page.
 *
 * Band order is gradient -> cream -> sand -> cream -> sand -> ink, so no two adjacent
 * sections share a background. Every photo in the media library is square, so each
 * image card forces its own rectangle with aspect-ratio and object-fit: cover.
 */

.app-page {
	--ap-ink: #1A1512;
	--ap-body: #665A4D;
	--ap-muted: #8C7F70;
	--ap-line: #E7DFD5;
	--ap-cream: #FDFBF8;
	--ap-sand: #F8F3EC;
	--ap-accent: #C97222;
	--ap-accent-dark: #AD5D19;
	--ap-amber: #E0A65F;
	--ap-on-dark: #C9C2BA;

	/* The bands are full-bleed, so cancel the generic .site-main gutters. */
	margin: -20px 0 -60px;
}

/* Shared type */
.app-eyebrow {
	display: block;
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ap-accent-dark);
}

.app-section-head {
	max-width: 760px;
	margin: 0 auto 40px;
	text-align: center;
}

.app-section-title {
	margin: 0;
	font-size: 32px;
	font-weight: 800;
	line-height: 1.22;
	color: var(--ap-ink);
}

.app-section-lede {
	margin: 14px 0 0;
	font-size: 15px;
	line-height: 1.8;
	color: var(--ap-body);
}

/* Buttons */
.app-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	height: 48px;
	padding: 0 26px;
	font-family: var(--font-title);
	font-size: 15px;
	font-weight: 700;
	border-radius: 999px;
	background: var(--ap-accent);
	color: #fff;
	box-shadow: 0 4px 12px rgba(201, 114, 34, .28);
	transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.app-btn:hover { background: var(--ap-accent-dark); color: #fff; transform: translateY(-1px); }
.app-btn-arrow { transition: transform .18s ease; }
.app-btn:hover .app-btn-arrow { transform: translateX(3px); }

.app-btn-ghost {
	background: transparent;
	border: 1px solid #D8D0C7;
	color: var(--ap-ink);
	box-shadow: none;
}
.app-btn-ghost:hover {
	background: transparent;
	border-color: var(--ap-accent);
	color: var(--ap-accent-dark);
}

/* ---------- Hero ---------- */
.app-hero {
	background: linear-gradient(180deg, var(--ap-cream) 0%, var(--ap-sand) 100%);
	padding: 34px 0 60px;
}

.app-crumb {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 22px;
	font-size: 13px;
	color: var(--ap-muted);
}
.app-crumb a { color: var(--ap-muted); text-decoration: none; }
.app-crumb a:hover { color: var(--ap-accent-dark); }
.app-crumb-sep { color: #D8D0C7; }
.app-crumb-current { color: var(--ap-ink); font-weight: 600; }

.app-hero-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
	gap: 52px;
	align-items: center;
}

.app-hero-title {
	margin: 0 0 18px;
	font-size: 42px;
	font-weight: 800;
	line-height: 1.14;
	letter-spacing: -.01em;
	color: var(--ap-ink);
}

.app-hero-lede {
	margin: 0 0 14px;
	font-size: 16px;
	line-height: 1.75;
	color: #4F463B;
}

.app-hero-text {
	margin: 0 0 26px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--ap-body);
}

.app-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* 2 x 2 mosaic — the source photos are square, the tiles are not. */
.app-mosaic {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.app-mosaic li {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid var(--ap-line);
	background: #fff;
	box-shadow: 0 14px 32px rgba(26, 21, 18, .1);
}

.app-mosaic a { display: block; position: relative; }

.app-mosaic img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .4s ease;
}
.app-mosaic a:hover img { transform: scale(1.05); }

.app-mosaic-label {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	padding: 7px 12px;
	border-radius: 999px;
	background: rgba(26, 21, 18, .72);
	color: #fff;
	font-family: var(--font-title);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
}

/* ---------- What decides the box ---------- */
.app-fit {
	background: var(--ap-cream);
	padding: 62px 0;
}

.app-fit-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.app-fit-card {
	padding: 26px 24px 24px;
	border: 1px solid var(--ap-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(26, 21, 18, .05);
}

.app-fit-index {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-bottom: 16px;
	border-radius: 9px;
	background: var(--ap-sand);
	color: var(--ap-accent-dark);
	font-family: var(--font-title);
	font-size: 14px;
	font-weight: 800;
}

.app-fit-title {
	margin: 0 0 10px;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.35;
	color: var(--ap-ink);
}

.app-fit-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.75;
	color: var(--ap-body);
}

/* ---------- Application cards ---------- */
.app-cases {
	background: var(--ap-sand);
	padding: 62px 0 66px;
}

.app-case-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.app-case-card > a {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--ap-line);
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.app-case-card > a:hover {
	transform: translateY(-4px);
	border-color: #DCCFC0;
	box-shadow: 0 16px 34px rgba(26, 21, 18, .12);
}

.app-case-media {
	display: block;
	flex: 0 0 auto;
	overflow: hidden;
}

.app-case-media img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform .4s ease;
}
.app-case-card > a:hover .app-case-media img { transform: scale(1.05); }

.app-case-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 18px 18px 20px;
}

.app-case-title {
	font-family: var(--font-title);
	font-size: 17px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--ap-ink);
}

.app-case-lede {
	margin-top: 9px;
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--ap-body);
}

.app-case-formats {
	display: block;
	margin-top: 14px;
	padding-top: 13px;
	border-top: 1px dashed var(--ap-line);
	font-size: 13px;
	line-height: 1.65;
	color: var(--ap-body);
}

.app-case-formats-label {
	display: block;
	margin-bottom: 3px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ap-accent-dark);
}

.app-case-more {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: auto;
	padding-top: 16px;
	font-family: var(--font-title);
	font-size: 13.5px;
	font-weight: 700;
	color: var(--ap-accent-dark);
}
.app-case-more span { transition: transform .18s ease; }
.app-case-card > a:hover .app-case-more span { transform: translateX(3px); }

/* ---------- Industries ---------- */
.app-sectors {
	background: var(--ap-cream);
	padding: 62px 0;
}

.app-sectors-inner {
	display: grid;
	grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
	gap: 48px;
	align-items: center;
}

.app-sectors-copy .app-section-title { font-size: 29px; }
.app-sectors-copy .app-section-lede { margin-top: 14px; }

.app-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.app-chip {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
}

.app-chip a {
	display: inline-block;
	padding: 10px 17px;
	border: 1px solid var(--ap-line);
	border-radius: 999px;
	background: #fff;
	color: var(--ap-ink);
	font-family: var(--font-title);
	font-weight: 700;
	text-decoration: none;
	transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.app-chip a:hover {
	border-color: var(--ap-accent);
	background: var(--ap-accent);
	color: #fff;
}

.app-chip-plain {
	padding: 10px 17px;
	border: 1px dashed var(--ap-line);
	border-radius: 999px;
	background: #fff;
	color: var(--ap-muted);
	font-family: var(--font-title);
	font-weight: 700;
}

/* ---------- Product list ---------- */
.app-products {
	background: var(--ap-sand);
	padding: 62px 0 66px;
}

.app-product-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.app-product-card > a {
	display: block;
	border: 1px solid var(--ap-line);
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease;
}
.app-product-card > a:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(26, 21, 18, .12);
}

.app-product-media { display: block; overflow: hidden; }

.app-product-media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .4s ease;
}
.app-product-card > a:hover .app-product-media img { transform: scale(1.05); }

.app-product-body {
	display: flex;
	flex-direction: column;
	padding: 16px 18px 20px;
}

.app-product-meta {
	margin-bottom: 7px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ap-accent-dark);
}

.app-product-title {
	font-family: var(--font-title);
	font-size: 17px;
	font-weight: 800;
	line-height: 1.35;
	color: var(--ap-ink);
}

.app-product-blurb {
	margin-top: 9px;
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--ap-body);
}

.app-products-foot {
	margin-top: 34px;
	text-align: center;
}

/* ---------- Closing band ---------- */
.app-cta {
	background: var(--ap-ink);
	padding: 58px 0;
}

.app-cta-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 40px;
	align-items: center;
}

.app-eyebrow-light { color: var(--ap-amber); }

.app-cta-title {
	margin: 0 0 12px;
	font-size: 29px;
	font-weight: 800;
	line-height: 1.25;
	color: #fff;
}

.app-cta-text {
	margin: 0;
	max-width: 640px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--ap-on-dark);
}

.app-cta-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}

.app-cta-note {
	font-size: 13px;
	color: var(--ap-on-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
	.app-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.app-fit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.app-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
	.app-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 34px; }
	.app-hero-title { font-size: 36px; }
	.app-mosaic img { aspect-ratio: 16 / 10; }
	.app-sectors-inner { grid-template-columns: minmax(0, 1fr); gap: 26px; }
	.app-cta-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.app-cta-actions { flex-direction: row; align-items: center; gap: 18px; }
}

@media (max-width: 782px) {
	.app-hero { padding: 24px 0 44px; }
	.app-hero-title { font-size: 31px; }
	.app-fit,
	.app-cases,
	.app-sectors,
	.app-products { padding: 46px 0; }
	.app-cta { padding: 46px 0; }
	.app-section-title { font-size: 26px; }
	.app-sectors-copy .app-section-title { font-size: 25px; }
	.app-product-grid { grid-template-columns: minmax(0, 1fr); }
	.app-cta-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 560px) {
	.app-case-grid,
	.app-fit-grid { grid-template-columns: minmax(0, 1fr); }
	.app-hero-actions { flex-direction: column; align-items: stretch; }
	.app-mosaic { gap: 10px; }
	.app-mosaic-label { left: 9px; right: 9px; bottom: 9px; font-size: 12px; padding: 6px 10px; }
}
