/*
 * Foundation — universal design tokens, typography, buttons and helpers.
 * Loaded sitewide. Component-level styles live alongside this file.
 *
 * Brand fonts: Inter (headings), Source Sans 3 (body + decorative quote).
 */

/* ──────────────────────────────────────────────────────────────────
 * Reset
 * ────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* ──────────────────────────────────────────────────────────────────
 * Content lists — the reset above strips list indentation, leaving bullets
 * and numbers hanging off the left in body copy. Restore a normal indent for
 * unclassed lists inside page content (UI lists carry classes, so are left
 * alone). :where() keeps specificity at zero so component styles still win.
 * ────────────────────────────────────────────────────────────────── */
:where( main ) :where( ul, ol ):not( [class] ) {
	padding-left: 1.5rem;
	margin-bottom: 1rem;
}
:where( main ) :where( ul, ol ):not( [class] ) li {
	margin-bottom: 0.35rem;
}

/* ──────────────────────────────────────────────────────────────────
 * Design tokens
 * ────────────────────────────────────────────────────────────────── */
:root {
	/* Brand core */
	--heritage-green: #0a4b2c;
	--heritage-green-deep: #083d24;
	--urban-grey: #6f6e63;

	/* Service palette (shared with sfs_service_type taxonomy slugs) */
	--cleaning: #5eb130;
	--survey: #e97b32;
	--restoration: #584998;
	--decorating: #50b3d8;
	--additional: #ba2574;

	/* Spare */
	--chartreuse: #dec829;

	/* Surface */
	--colour-cream: #faf8f5;
	--colour-white: #ffffff;
	--colour-border: #e5e0d8;
	--colour-text: #444444;
	--colour-text-light: #999999;

	/* Typography */
	--font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-quote: 'Source Sans 3', sans-serif;

	/* Layout */
	--container: 1100px;
	--container-padding: 2rem;

	/* Typography scale — large body copy variant (used by .p-large) */
	--font-size-large: 1.35rem;
	--line-height-large: 1.65;
}

/* ──────────────────────────────────────────────────────────────────
 * Base elements
 * ────────────────────────────────────────────────────────────────── */
html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	color: var(--colour-text);
	background: var(--colour-cream);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--heritage-green);
	letter-spacing: -0.025em;
	text-transform: uppercase;
	line-height: 1.3;
	font-weight: 600;
}

h1 { font-size: clamp(1.85rem, 3.6vw, 2.85rem); line-height: 1.12; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
	margin: 0 0 1rem;
}

p:last-child {
	margin-bottom: 0;
}

/* Larger paragraph variant — applied via the editor "Paragraph Large" format
 * selector. Single source of truth for the size, tokens in :root. */
.p-large {
	font-size: var(--font-size-large);
	line-height: var(--line-height-large);
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ──────────────────────────────────────────────────────────────────
 * Layout: container
 * ────────────────────────────────────────────────────────────────── */
.container {
	width: 100%;
	max-width: var(--container);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-padding);
	padding-right: var(--container-padding);
}

/* ──────────────────────────────────────────────────────────────────
 * Buttons — universal
 * ────────────────────────────────────────────────────────────────── */
.btn {
	display: inline-block;
	padding: 0.9rem 2.2rem;
	font-family: var(--font-body);
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	border: none;
	cursor: pointer;
	border-radius: 4px;
	text-align: center;
	transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.btn-primary {
	background: var(--heritage-green);
	color: var(--colour-white);
}

.btn-primary:hover {
	background: var(--heritage-green-deep);
	color: var(--colour-white);
}

.btn-secondary {
	background: transparent;
	color: var(--heritage-green);
	border: 2px solid var(--heritage-green);
}

.btn-secondary + .btn,
.btn + .btn-secondary {
	margin-left: 1rem;
}

.btn-secondary:hover {
	background: var(--heritage-green);
	color: var(--colour-white);
}

/* ──────────────────────────────────────────────────────────────────
 * Section heading
 * ────────────────────────────────────────────────────────────────── */
.section-heading {
	text-align: center;
	margin-bottom: 3rem;
}

.section-heading h2 {
	font-size: 2rem;
	color: var(--heritage-green);
	margin-bottom: 0.5rem;
}

.section-heading p {
	color: var(--colour-text-light);
	max-width: 500px;
	margin: 0 auto;
}

/* ──────────────────────────────────────────────────────────────────
 * Scroll-in animation helpers (paired with assets/js/animations.js)
 * ────────────────────────────────────────────────────────────────── */
.fade-in {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.fade-in-child {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in-child.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ──────────────────────────────────────────────────────────────────
 * Service colour utility — used for tags, accents and theming
 * (shared vocabulary with the sfs_service_type taxonomy slugs)
 * ────────────────────────────────────────────────────────────────── */
.service-tag {
	display: inline-block;
	padding: 0.35rem 0.75rem;
	font-family: var(--font-heading);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--colour-white);
	background: var(--urban-grey);
	border-radius: 999px;
	margin-right: 0.4rem;
	margin-bottom: 0.4rem;
}

.service-tag--cleaning    { background: var(--cleaning); }
.service-tag--survey      { background: var(--survey); }
.service-tag--restoration { background: var(--restoration); }
.service-tag--decorating  { background: var(--decorating); }
.service-tag--additional  { background: var(--additional); }

/* ──────────────────────────────────────────────────────────────────
 * Breadcrumb
 * ────────────────────────────────────────────────────────────────── */
.breadcrumb {
	font-family: var(--font-heading);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--urban-grey);
	margin-bottom: 1.5rem;
}

.breadcrumb a {
	color: var(--urban-grey);
}

.breadcrumb a:hover {
	color: var(--heritage-green);
}

.breadcrumb > span[aria-hidden] {
	margin: 0 0.5rem;
	opacity: 0.5;
}

.breadcrumb [aria-current="page"] {
	color: var(--heritage-green);
}

/* ──────────────────────────────────────────────────────────────────
 * Accessibility: screen-reader only
 * ────────────────────────────────────────────────────────────────── */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ──────────────────────────────────────────────────────────────────
 * Reduced-motion preferences
 * ────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	.fade-in,
	.fade-in-child {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}
