/* WS48 Client Projects – landing pattern + live blocks */

.ws48cp-landing,
.ws48cp {
	/* WS48 brand palette */
	--ws48-deep-blue: #26526E;   /* hero */
	--ws48-warm-cream: #EDE8DE;  /* hero */
	--ws48-terracotta: #C1694A;  /* secondary – primary buttons (large white text) + decorative */
	--ws48-greige: #A8A296;      /* secondary */
	--ws48-soft-black: #1A1A1A;  /* secondary */
	--ws48-brick-red: #9C3A2B;   /* accent */

	/* Roles */
	--ws48cp-primary: var(--ws48-terracotta);   /* primary buttons */
	--ws48cp-primary-hover: var(--ws48-brick-red);
	--ws48cp-accent: var(--ws48-deep-blue);     /* CTA band, active filter */
	--ws48cp-eyebrow: var(--ws48-brick-red);    /* small section labels */
	--ws48cp-hover: var(--ws48-brick-red);      /* primary button hover */
	--ws48cp-ink: var(--ws48-soft-black);
	--ws48cp-ground: var(--ws48-warm-cream);       /* light buttons on dark/blue sections */
	--ws48cp-page: #FFFFFF;                     /* page background */
	--ws48cp-hero-bg: #FFFFFF;                  /* hero banner (was Warm Cream); change here to tint it again */
	--ws48cp-band: #D8D3C8;                     /* 30% Greige on Warm Cream */
	--ws48cp-line: var(--ws48-greige);
	--ws48cp-tile: #E2DCD0;                     /* image placeholders */
	--ws48cp-muted: #5A5852;                    /* Soft Black 70% on cream – 5.8:1 */
	--ws48cp-body: #3A3936;
	--ws48cp-radius: 20px;
	--ws48cp-btn-radius: 8px;                   /* buttons: rounded rectangle */
	--ws48cp-max: 1280px;
	--ws48cp-gutter: 32px;
}
@media (max-width: 600px) {
	.ws48cp-landing, .ws48cp { --ws48cp-gutter: 20px; }
}

/* ---------- Page shell (pattern) ---------- */
html:has(.ws48cp-landing) { overflow-x: clip; }
.ws48cp-landing {
	/* full-bleed even inside a narrow theme container */
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	max-width: 100vw !important;
	width: auto;
	padding: 0;
	background: var(--ws48cp-page);
	color: var(--ws48cp-ink);
	-webkit-font-smoothing: antialiased;
}
.ws48cp-landing > * + *,
.ws48cp-landing > .wp-block-group__inner-container > * + * { margin-top: 0; margin-block-start: 0; }

.ws48cp-landing .ws48cp-sec { padding-left: var(--ws48cp-gutter) !important; padding-right: var(--ws48cp-gutter) !important; }
/* no theme gaps between sections, so the cream hero reads as one banner */
.ws48cp-landing .ws48cp-sec { margin-top: 0 !important; margin-bottom: 0 !important; }
/* Hero banner = intro + stats + featured project */
.ws48cp-sec--hero     { padding-top: 64px; padding-bottom: 48px; background: var(--ws48cp-hero-bg); }
.ws48cp-sec--featured { padding-bottom: 72px; background: var(--ws48cp-hero-bg); }
.ws48cp-sec--grid     { padding-top: 72px; padding-bottom: 88px; }
.ws48cp-sec--book     { background: var(--ws48cp-page); padding-top: 0; padding-bottom: 0; }
.ws48cp-sec--cta      { padding-top: 72px; padding-bottom: 96px; }

/* constrain each section's content */
.ws48cp-sec .ws48cp-hero,
.ws48cp-sec .ws48cp-book,
.ws48cp-sec .ws48cp-cta,
.ws48cp-sec > .ws48cp,
.ws48cp-sec > .wp-block-group__inner-container > .ws48cp {
	max-width: var(--ws48cp-max);
	margin-left: auto;
	margin-right: auto;
}

/* ---------- Fonts ----------
   Set in Projects › Landing Page (defaults: Archivo 800 headings, Instrument Sans body).
   If a font is left empty there, the theme's font is used. */
body .ws48cp-landing,
body .ws48cp {
	font-family: var(--ws48cp-font-body, inherit);
}
body .ws48cp-landing .wp-block-button__link,
body .ws48cp-landing p,
body .ws48cp button,
body .ws48cp .ws48cp-btn,
body .ws48cp p,
body .ws48cp dt,
body .ws48cp li {
	font-family: var(--ws48cp-font-body, inherit);
}
body .ws48cp-landing h1,
body .ws48cp-landing h2,
body .ws48cp-landing h3,
body .ws48cp h2,
body .ws48cp h3,
body .ws48cp .ws48cp-stat dd {
	font-family: var(--ws48cp-font-heading, inherit);
	font-weight: var(--ws48cp-heading-weight, 800);
	letter-spacing: -0.025em;
}
body .ws48cp-landing h1 { letter-spacing: -0.03em; }

/* ---------- Shared type ---------- */
.ws48cp-landing .ws48cp-eyebrow,
.ws48cp .ws48cp-eyebrow {
	margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	color: var(--ws48cp-eyebrow);
}
.ws48cp .ws48cp-eyebrow--light { color: var(--ws48-greige); font-size: 13px; }
.ws48cp-landing .ws48cp-hero__title {
	margin: 0; font-size: clamp(40px, 5.4vw, 76px); line-height: 1.05; color: inherit;
}
.ws48cp-landing .ws48cp-hero__intro { margin: 0; font-size: 19px; line-height: 1.55; color: var(--ws48cp-body); max-width: 560px; }
.ws48cp-landing .ws48cp-h2,
.ws48cp .ws48cp-h2 {
	margin: 0; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.1; color: inherit;
}
.ws48cp-landing .ws48cp-h2--lg { font-size: clamp(32px, 3.6vw, 44px); }
.ws48cp-landing .ws48cp-lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ws48cp-body); max-width: 560px; }
.ws48cp .ws48cp-muted { margin: 0; color: var(--ws48cp-muted); font-size: 16px; }

/* ---------- Hero ---------- */
.wp-block-columns.ws48cp-hero { gap: 48px; align-items: flex-end; margin-bottom: 0; }
.ws48cp-hero__copy { display: flex; flex-direction: column; gap: 24px; }
.ws48cp-hero__copy > * { margin: 0 !important; }
@media (min-width: 782px) {
	.wp-block-columns.ws48cp-hero > .ws48cp-hero__copy  { flex: 1.35 1 0 !important; }
	.wp-block-columns.ws48cp-hero > .ws48cp-hero__stats { flex: 1 1 0 !important; }
}

/* ---------- Core buttons in the pattern ---------- */
.ws48cp-landing .wp-block-buttons.ws48cp-actions { gap: 12px; margin: 0; }
body .ws48cp-landing .wp-block-button > .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 52px; padding: 0 26px; border-radius: var(--ws48cp-btn-radius); border: 1.5px solid transparent;
	text-decoration: none;
	transition: background-color .15s, color .15s, border-color .15s, transform .15s;
	box-shadow: none;
}
body .ws48cp-landing .wp-block-button > .wp-block-button__link:hover { transform: translateY(-1px); }
/* Primary: Terracotta. White on Terracotta is 3.9:1, so the label stays large-text size (19px bold) to meet WCAG AA. */
body .ws48cp-landing .ws48cp-b-accent  > .wp-block-button__link {
	background: var(--ws48cp-primary); color: #fff; font-size: 19px; font-weight: 700;
}
body .ws48cp-landing .ws48cp-b-accent  > .wp-block-button__link:hover { background: var(--ws48cp-primary-hover); color: #fff; }
body .ws48cp-landing .ws48cp-b-outline > .wp-block-button__link { background: transparent; color: var(--ws48cp-ink); border-color: var(--ws48cp-ink); }
body .ws48cp-landing .ws48cp-b-outline > .wp-block-button__link:hover { background: var(--ws48cp-ink); color: var(--ws48cp-ground); }
body .ws48cp-landing .ws48cp-b-dark    > .wp-block-button__link { background: var(--ws48cp-ink); color: var(--ws48cp-ground); }
body .ws48cp-landing .ws48cp-b-dark    > .wp-block-button__link:hover { background: var(--ws48cp-accent); color: #fff; }
body .ws48cp-landing .ws48cp-b-white   > .wp-block-button__link { background: var(--ws48-warm-cream); color: var(--ws48cp-ink); }
body .ws48cp-landing .ws48cp-b-white   > .wp-block-button__link:hover { background: var(--ws48cp-ink); color: var(--ws48-warm-cream); }
body .ws48cp-landing .ws48cp-b-ghost   > .wp-block-button__link { background: transparent; color: var(--ws48-warm-cream); border-color: var(--ws48-warm-cream); }
body .ws48cp-landing .ws48cp-b-ghost   > .wp-block-button__link:hover { background: var(--ws48-warm-cream); color: var(--ws48cp-ink); }
body .ws48cp-landing .ws48cp-b-text    > .wp-block-button__link {
	background: transparent; color: var(--ws48cp-ink); padding: 0 6px; min-height: 44px;
	font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
body .ws48cp-landing .ws48cp-b-text    > .wp-block-button__link:hover { color: var(--ws48cp-hover); transform: none; }
.ws48cp-landing a:focus-visible,
.ws48cp a:focus-visible,
.ws48cp button:focus-visible { outline: 3px solid var(--ws48cp-accent); outline-offset: 3px; }

/* ---------- Project Book band ---------- */
.wp-block-columns.ws48cp-book { gap: 48px; margin-bottom: 0; }
@media (min-width: 782px) {
	.wp-block-columns.ws48cp-book > .ws48cp-book__media { flex: 0 0 320px !important; }
}
.ws48cp-book__copy { display: flex; flex-direction: column; gap: 18px; }
.ws48cp-book__copy > * { margin: 0 !important; }
.ws48cp-landing .wp-block-image.ws48cp-book__cover { margin: 0; max-width: 320px; }
.ws48cp-landing .wp-block-image.ws48cp-book__cover img {
	width: 100%; height: auto; border-radius: 8px; box-shadow: 0 24px 48px rgba(26,26,26,.18);
}

/* ---------- Closing CTA ---------- */
.wp-block-columns.ws48cp-cta {
	background: var(--ws48cp-accent); color: #fff; border-radius: var(--ws48cp-radius);
	padding: 64px 48px; gap: 32px; margin-bottom: 0;
}
.ws48cp-cta .ws48cp-cta__copy > * { margin: 0 0 12px; }
.ws48cp-cta .ws48cp-cta__copy > *:last-child { margin-bottom: 0; }
.ws48cp-cta .ws48cp-cta__copy p { font-size: 18px; line-height: 1.55; color: var(--ws48-warm-cream); }
.ws48cp-cta .ws48cp-h2 { color: #fff; }
@media (min-width: 782px) {
	.wp-block-columns.ws48cp-cta > .ws48cp-cta__copy    { flex: 1.5 1 0 !important; }
	.wp-block-columns.ws48cp-cta > .ws48cp-cta__buttons { flex: 1 1 0 !important; }
	.ws48cp-cta__buttons .wp-block-buttons { justify-content: flex-end; }
}
@media (max-width: 600px) { .wp-block-columns.ws48cp-cta { padding: 40px 24px; } }

/* =====================================================================
   Live blocks
   ================================================================== */
.ws48cp { color: var(--ws48cp-ink); line-height: 1.5; }
.ws48cp *, .ws48cp *::before, .ws48cp *::after { box-sizing: border-box; }
.ws48cp img { display: block; max-width: 100%; height: auto; }
.ws48cp h2, .ws48cp h3, .ws48cp p, .ws48cp ul, .ws48cp dl, .ws48cp dd { margin: 0; padding: 0; }
.ws48cp ul { list-style: none; }
.ws48cp-sr {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.ws48cp-icon { flex: none; }
.ws48cp-ph {
	display: block; width: 100%; height: 100%; min-height: 160px;
	background-color: var(--ws48cp-tile);
	background-image: repeating-linear-gradient(135deg, rgba(168,162,150,.25) 0 2px, transparent 2px 14px);
}
.ws48cp .ws48cp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
body .ws48cp .ws48cp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 0 26px; border-radius: var(--ws48cp-btn-radius); border: 1.5px solid transparent;
	text-decoration: none;
	cursor: pointer; box-shadow: none; transition: background-color .15s, color .15s, transform .15s;
}
body .ws48cp .ws48cp-btn--outline { background: transparent; color: var(--ws48cp-ink); border-color: var(--ws48cp-ink); }
body .ws48cp .ws48cp-btn--outline:hover { background: var(--ws48cp-ink); color: var(--ws48cp-ground); }
body .ws48cp .ws48cp-btn--light { background: var(--ws48cp-ground); color: var(--ws48cp-ink); }
body .ws48cp .ws48cp-btn--light:hover { background: var(--ws48-greige); color: var(--ws48cp-ink); }
.ws48cp .ws48cp-textlink {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
	font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.ws48cp .ws48cp-textlink--light { color: var(--ws48cp-ground); }
.ws48cp .ws48cp-textlink--light:hover { color: var(--ws48-greige); }

/* ---------- Stats ---------- */
.ws48cp-stats {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
	background: var(--ws48cp-line); border: 1px solid var(--ws48cp-line);
	border-radius: 16px; overflow: hidden;
}
.ws48cp-stat { background: var(--ws48cp-hero-bg); padding: 24px; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; }
.ws48cp-stat dd { order: -1; } /* number first, so every number lines up at the top of its tile */
.ws48cp-stat dd { font-size: 40px; font-weight: 700; line-height: 1.1; }
.ws48cp-stat dt { font-size: 14px; color: var(--ws48cp-muted); }
.ws48cp-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Featured ---------- */
.ws48cp.ws48cp-featured {
	display: flex; flex-wrap: wrap; background: var(--ws48cp-ink); color: var(--ws48cp-ground);
	border-radius: var(--ws48cp-radius); overflow: hidden;
}
.ws48cp-featured__media { flex: 3 1 560px; min-width: 0; min-height: 360px; position: relative; background: #2A2A2A; }
.ws48cp-featured__media img,
.ws48cp-featured__media .ws48cp-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ws48cp-featured__media .ws48cp-ph { background-color: #2A2A2A; background-image: repeating-linear-gradient(135deg, rgba(237,232,222,.06) 0 2px, transparent 2px 14px); }
.ws48cp-featured__body { flex: 2 1 380px; min-width: 0; padding: 48px 44px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 600px) { .ws48cp-featured__body { padding: 32px 24px; } .ws48cp-featured__media { min-height: 260px; } }
.ws48cp .ws48cp-featured__title { font-size: 44px; line-height: 1.1; color: inherit; }
.ws48cp-featured__summary { font-size: 17px; line-height: 1.6; color: #D6D0C4; }
.ws48cp-specs { border-top: 1px solid #3D3B37; }
.ws48cp-specs li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #3D3B37; font-size: 15px; }
.ws48cp-specs span { color: var(--ws48-greige); }
.ws48cp-specs a { color: inherit; }
.ws48cp-specs a:hover { color: var(--ws48-warm-cream); }
.ws48cp-specs strong { font-weight: 600; white-space: nowrap; }

/* ---------- Grid ---------- */
.ws48cp-projects__head {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
	padding-bottom: 28px; border-bottom: 1px solid var(--ws48cp-line);
}
.ws48cp-projects__titles { display: flex; flex-direction: column; gap: 8px; }
.ws48cp-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ws48cp .ws48cp-chip {
	min-height: 44px; padding: 0 18px; border-radius: 999px;
	background: transparent; color: var(--ws48cp-ink); border: 1.5px solid var(--ws48cp-line);
	font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: none;
	transition: background-color .15s, border-color .15s, color .15s;
}
.ws48cp .ws48cp-chip:hover { border-color: var(--ws48cp-ink); background: transparent; color: var(--ws48cp-ink); }
.ws48cp .ws48cp-chip[aria-pressed="true"] { background: var(--ws48cp-accent); color: #fff; border-color: var(--ws48cp-accent); }

.ws48cp-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 40px 28px; padding-top: 36px !important;
}
.ws48cp-card[hidden] { display: none; }
.ws48cp .ws48cp-card__link { display: flex; flex-direction: column; gap: 14px; color: var(--ws48cp-ink); text-decoration: none; }
.ws48cp-card__media { aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--ws48cp-tile); }
.ws48cp-card__media img, .ws48cp-card__media .ws48cp-ph { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ws48cp-card__link:hover .ws48cp-card__media img { transform: scale(1.03); }
.ws48cp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ws48cp-tag {
	font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
	color: var(--ws48cp-muted); border: 1px solid var(--ws48cp-line); padding: 4px 9px; border-radius: 999px;
}
.ws48cp-card__title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ws48cp .ws48cp-card__title h3 { font-size: 24px; line-height: 1.2; color: inherit; }
.ws48cp-card__title .ws48cp-icon { transition: transform .15s; }
.ws48cp-card__link:hover .ws48cp-card__title .ws48cp-icon { transform: translateX(4px); color: var(--ws48-terracotta); }
.ws48cp-card__link:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.ws48cp-card__products { font-size: 15px; color: var(--ws48cp-muted); }
.ws48cp-more { display: flex; justify-content: center; padding-top: 48px; }
.ws48cp .ws48cp-more [hidden] { display: none !important; }
.ws48cp-preview-note { padding-top: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
	.ws48cp *, .ws48cp-landing * { transition: none !important; }
}

/* Archive takeover: neutralise theme spacing on the content wrapper */
.ws48cp-article, .ws48cp-entry { margin: 0 !important; padding: 0 !important; max-width: none; }

/* Safety net: if the theme's own projects template still renders, hide its old
   project list that it prints right after our landing page content. */
.site-main:has(> .ws48cp-landing) > .container,
.site-main:has(> .ws48cp-landing) > .ws48cp-landing ~ .container { display: none !important; }

/* Headline full stops in Terracotta (large text: 3.2:1 on cream passes WCAG AA for large text) */
.ws48cp-landing .ws48cp-dot { color: var(--ws48-terracotta); }
