/*
 * Cut Above Carpentry — global design system.
 *
 * Ported from designs/cut-above-carpentry/assets/css/cut-above.css (the token
 * block, base, button and the pieces more than one section shares). Enqueued on
 * the front end AND in the block editor (add_editor_style), so blocks look the
 * same in both. Section-specific CSS lives in each block's style.scss; the
 * header, drawer and footer live in chrome.css.
 *
 * One copper, one icon set, one button, one panel shape.
 */

/* --- Satoshi, self-hosted (Fontshare, ITF Free Font License). Only the four
   weights the design uses. swap: text paints in the fallback first. --- */
@font-face {
	font-family: "Satoshi";
	src: url("../fonts/satoshi-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Satoshi";
	src: url("../fonts/satoshi-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Satoshi";
	src: url("../fonts/satoshi-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Satoshi";
	src: url("../fonts/satoshi-900.woff2") format("woff2");
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

:root {
	/* colour */
	--ca-ink: #141414;          /* headings, buttons, footer ground */
	--ca-body: #555b63;         /* body copy, 6.9:1 on white */
	--ca-muted: #62676f;        /* captions, 5.7:1 on white, 5.2:1 on band */
	--ca-copper: #ac7350;       /* brand copper: display accent, icons, rules. 3.95:1 on white: large/graphic only */
	--ca-copper-ink: #8a5636;   /* copper TEXT under 24px, 6.1:1 on white */
	--ca-copper-soft: #e0b08f;  /* copper on the black drawer */
	--ca-copper-line: rgba(172, 115, 80, 0.42); /* construction-drawing hairline */
	--ca-paper: #fff;
	--ca-band: #f6f4f1;         /* the one alternate ground */
	--ca-rule: #e6e1db;
	--ca-scrim-ink: 16, 14, 12; /* rgb triplet for the hero washes */

	/* type */
	--ca-font: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--ca-h1: clamp(2.5rem, 1.4rem + 4.6vw, 4.5rem);
	--ca-h2: clamp(2rem, 1.35rem + 2.6vw, 3.1rem);
	--ca-h3: 1.0625rem;
	--ca-lead: 1.0625rem;
	--ca-small: 0.9375rem;

	/* layout */
	--ca-max: 1200px;
	--ca-gutter: clamp(16px, 4vw, 40px);
	--ca-panel-radius: 28px;
	--ca-img-radius: 12px;
	--ca-btn-radius: 6px;
	--ca-section: clamp(64px, 8vw, 104px);

	/* motion */
	--ca-ease: cubic-bezier(0.16, 1, 0.3, 1);

	/* Aliases the starter's editor chrome (editor.css, src/shared) still reads. */
	--ca-ink-soft: var(--ca-muted);
	--ca-dark-line: #3a3633;
	--ca-font-spec: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 560px) {
	:root {
		--ca-panel-radius: 22px;
		--ca-h2: 1.75rem; /* section titles sit clearly under the 40px hero title */
	}
}

/* --- Base. WordPress ships no reset on the front end (SETUP §9). --- */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	font-family: var(--ca-font);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--ca-body);
	background: var(--ca-paper);
	-webkit-font-smoothing: antialiased;
}
img,
video {
	display: block;
	max-width: 100%;
	height: auto;
}
a {
	color: inherit;
}
h1,
h2,
h3,
h4 {
	color: var(--ca-ink);
	margin: 0;
	font-weight: 700;
}
p {
	margin: 0;
}
button,
input,
select,
textarea {
	font: inherit;
}
:focus-visible {
	outline: 2px solid var(--ca-copper);
	outline-offset: 3px;
	border-radius: 4px;
}
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ca-wrap {
	width: min(var(--ca-max), 100% - 2 * var(--ca-gutter));
	margin-inline: auto;
}

/* --- Button: one shape, ink by default, white on photos. --- */
.ca-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 13px 22px;
	border: 0;
	border-radius: var(--ca-btn-radius);
	background: var(--ca-ink);
	color: #fff;
	font-weight: 700;
	font-size: 0.975rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.ca-btn:hover {
	background: #2c2a28;
	color: #fff;
}
.ca-btn svg {
	width: 16px;
	height: 16px;
	flex: none;
	transition: transform 0.2s ease;
}
.ca-btn:hover svg {
	transform: translate(2px, -2px);
}
.ca-btn--light {
	background: #fff;
	color: var(--ca-ink);
}
.ca-btn--light:hover {
	background: #f1ede8;
	color: var(--ca-ink);
}
.ca-btn--block {
	display: flex;
	justify-content: center;
}

/* The warm grey section ground (process, callout). Here, not in a block, because
   a block stylesheet only loads on pages that use that block. */
.ca-band-sec {
	padding: var(--ca-section) 0;
	background: var(--ca-band);
}

/* --- The white panel that rides up over the hero (intro, projects, contact).
   Shared, because a block stylesheet only loads where that block is used. --- */
.ca-intro {
	position: relative;
	z-index: 2;
	margin-top: calc(-1 * var(--ca-panel-radius) - 4px);
	padding: clamp(56px, 6vw, 80px) 0 var(--ca-section);
	overflow: hidden;
	border-radius: var(--ca-panel-radius) var(--ca-panel-radius) 0 0;
	background: var(--ca-paper);
}
/* flat variant: white panel butted under the hero, square top */
.ca-intro--flat {
	margin-top: calc(-1 * var(--ca-panel-radius));
	border-radius: 0;
}
.ca-intro .ca-wrap {
	position: relative;
	z-index: 1;
}

/* --- Shared text pieces --- */
/* Two selectors on purpose (as in the design): inside a section head the
   eyebrow must beat `.ca-section-head p`, or it takes the lead's margin and size. */
.ca-eyebrow,
.ca-section-head .ca-eyebrow {
	margin: 0 0 14px;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ca-copper-ink);
}
.ca-accent {
	color: var(--ca-copper);
}
.ca-section-head {
	max-width: 60ch;
	margin-bottom: 40px;
}
.ca-section-head h2 {
	font-size: var(--ca-h2);
	line-height: 1.08;
	letter-spacing: -0.022em;
}
.ca-section-head p {
	margin-top: 10px;
	font-size: var(--ca-lead);
}
.ca-section-head--center {
	text-align: center;
	margin-inline: auto;
}

/* Text link after a block of copy ("Explore Our Process", project cross-links). */
.ca-textlink {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin-top: 14px;
	color: var(--ca-copper-ink);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}
.ca-textlink svg {
	width: 16px;
	height: 16px;
	flex: none;
}
.ca-textlink:hover {
	color: var(--ca-ink);
}

/* --- Icons: one line family from assets/img/icons.svg, copper, 1.5 stroke. --- */
.ca-icon {
	width: 44px;
	height: 44px;
	color: var(--ca-copper);
	stroke-width: 1.5;
}

/* Tick list (intro, contact "what happens next", phases). */
.ca-tick {
	width: 22px;
	height: 22px;
	color: var(--ca-copper);
	flex: none;
}
.ca-ticks {
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	display: grid;
	gap: 10px;
}
.ca-ticks li {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 12px;
	align-items: start;
}
.ca-ticks li span {
	color: var(--ca-body);
}
.ca-ticks b {
	color: var(--ca-ink);
}

/* Credential pills (intro, phases, band). */
.ca-creds {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}
.ca-creds li {
	padding: 8px 16px;
	border: 1px solid var(--ca-rule);
	border-radius: 999px;
	background: #fff;
	color: var(--ca-ink);
	font-size: 0.9375rem;
	font-weight: 700;
}
/* --- Google review card. Shared by the reviews strip and the project case
   studies, so it lives here rather than in either block. --- */
.ca-stars {
	display: inline-flex;
	gap: 1px;
	color: #fbbc04;
}
.ca-stars svg {
	width: 15px;
	height: 15px;
}
.ca-greview {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px 22px 18px;
	background: #fff;
	border: 1px solid #dadce0;
	border-radius: 8px;
}
.ca-greview__head {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) 20px;
	align-items: center;
	gap: 12px;
}
.ca-greview__avatar {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--av, #455a64);
	color: #fff;
	font-family: Roboto, Arial, sans-serif;
	font-size: 1.125rem;
	font-weight: 500;
}
.ca-greview__name {
	overflow: hidden;
	color: #202124;
	font-size: 0.975rem;
	font-weight: 700;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ca-greview__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 3px;
	font-size: 0.8125rem;
	color: var(--ca-muted);
}
.ca-greview__meta .ca-stars svg {
	width: 13px;
	height: 13px;
}
.ca-greview__g {
	width: 20px;
	height: 20px;
	align-self: start;
}
.ca-greview__text {
	margin: 0;
	color: #3c4043;
	font-size: 0.9375rem;
	line-height: 1.6;
}
.ca-greview__text p + p {
	margin-top: 0.6em;
}
.ca-greview__text.is-clamped {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 7;
	overflow: hidden;
}
.ca-greview__toggle {
	align-self: flex-start;
	min-height: 32px;
	margin-top: -6px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--ca-ink);
	cursor: pointer;
}
.ca-greview__toggle:hover {
	text-decoration: underline;
}
.ca-greview__link {
	margin-top: auto;
	font-size: 0.8125rem;
	color: #1558d6;
	text-decoration: none;
}
.ca-greview__link:hover {
	text-decoration: underline;
}
.ca-greview--compact {
	gap: 10px;
	padding: 16px 18px 14px;
}
.ca-greview__label {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--ca-muted);
}

/* --- Reduced motion. Written as `transition: none`, never a tiny duration:
   the tiny-duration form leaves the closed drawer's visibility:hidden on its
   children for a frame and focus() silently fails (mobile-menu-pattern.md). --- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}
