/**
 * Accre List — Global Styles
 * Source: Figma Branding Guide + local text/paint styles
 * https://www.figma.com/design/peSJIVMSSVsLqGYh3mq9BV
 *
 * Breakpoints:
 * - Mobile:  0–767px   → mobile fonts
 * - Tablet:  768–1023px → desktop fonts
 * - Desktop: 1024px+   → desktop fonts
 */

/* ==========================================================================
   Font fallbacks — metric-matched local fonts (prevents layout shift, rule #25)
   Each web font is preceded in its stack by a local Arial/Times face resized so text
   occupies the same box before and after the Google Font swaps in. Values measured
   from the Google Fonts latin files vs Arial/Times (regular, bold, italic); Lato
   upright values then tuned in-browser so homepage/about sections keep identical
   heights at 390px and 1440px.
   ========================================================================== */

@font-face {
	font-family: "Lato Fallback";
	font-weight: 100 599;
	src: local("Arial"), local("ArialMT");
	size-adjust: 98.2%;
	ascent-override: 100.51%;
	descent-override: 21.69%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Lato Fallback";
	font-weight: 600 900;
	src: local("Arial Bold"), local("Arial-BoldMT");
	size-adjust: 94%;
	ascent-override: 105%;
	descent-override: 22.66%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Poppins Fallback";
	font-weight: 100 599;
	src: local("Arial"), local("ArialMT");
	size-adjust: 112.95%;
	ascent-override: 92.96%;
	descent-override: 30.99%;
	line-gap-override: 8.85%;
}

@font-face {
	font-family: "Poppins Fallback";
	font-weight: 600 900;
	src: local("Arial Bold"), local("Arial-BoldMT");
	size-adjust: 107.11%;
	ascent-override: 98.03%;
	descent-override: 32.68%;
	line-gap-override: 9.34%;
}

@font-face {
	font-family: "Cormorant Garamond Fallback";
	font-weight: 100 599;
	src: local("Times New Roman"), local("TimesNewRomanPSMT");
	size-adjust: 97%;
	ascent-override: 95.25%;
	descent-override: 29.59%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Cormorant Garamond Fallback";
	font-weight: 600 900;
	src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT");
	size-adjust: 92.38%;
	ascent-override: 100.02%;
	descent-override: 31.07%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Roboto Fallback";
	font-weight: 100 599;
	src: local("Arial"), local("ArialMT");
	size-adjust: 100.39%;
	ascent-override: 92.41%;
	descent-override: 24.32%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Roboto Fallback";
	font-weight: 600 900;
	src: local("Arial Bold"), local("Arial-BoldMT");
	size-adjust: 93.93%;
	ascent-override: 98.77%;
	descent-override: 25.99%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Lato Fallback";
	font-style: italic;
	font-weight: 100 599;
	src: local("Arial Italic"), local("Arial-ItalicMT");
	size-adjust: 90.28%;
	ascent-override: 109.33%;
	descent-override: 23.59%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Lato Fallback";
	font-style: italic;
	font-weight: 600 900;
	src: local("Arial Bold Italic"), local("Arial-BoldItalicMT");
	size-adjust: 85.17%;
	ascent-override: 115.89%;
	descent-override: 25.01%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Cormorant Garamond Fallback";
	font-style: italic;
	font-weight: 100 599;
	src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT");
	size-adjust: 87.39%;
	ascent-override: 105.73%;
	descent-override: 32.84%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Cormorant Garamond Fallback";
	font-style: italic;
	font-weight: 600 900;
	src: local("Times New Roman Bold Italic"), local("TimesNewRomanPS-BoldItalicMT");
	size-adjust: 86.77%;
	ascent-override: 106.49%;
	descent-override: 33.08%;
	line-gap-override: 0%;
}

/* ==========================================================================
   CSS Variables — Colors & Fonts
   ========================================================================== */

:root {
	/* Brand colors — Figma Button Assets (node 21337:6555) */
	--color-yellow: #ffde16;
	--color-lime: #a4ce4c;
	--color-bright-green: #507109;
	--color-teal: #126b57; /* Label / accent green from Figma */
	--color-dark-green: #143830;
	--color-brand-dark: #1c393e; /* Branding Guide / dark button surface */

	/* Button tokens */
	--btn-radius: 200px;
	--btn-padding-y: 19px; /* Figma 20px minus the 1px .btn border, so the button height matches Figma (60px) */
	--btn-padding-x: 32px;
	--btn-padding-y-lg: 23px; /* Figma 24px minus the 1px .btn border (68px) */
	--btn-gap: 12px;
	--btn-hover-opacity: 0.8;
	--btn-disabled-opacity: 0.5;
	--btn-transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;

	/* Greyscale */
	--color-white: #ffffff;
	--color-grey-100: #f3f3f3;
	--color-grey-200: #eaeaea;
	--color-grey-300: #dedede;
	--color-grey-400: #cccccc;
	--color-grey-500: #afafaf;
	--color-grey-600: #858585;
	--color-grey-700: #606060;
	--color-grey-800: #454545;
	--color-grey-900: #292929;
	--color-black: #020202;

	/* Semantic aliases */
	--color-text: var(--color-black);
	--color-text-muted: var(--color-grey-700);
	--color-text-light: var(--color-grey-200);
	--color-bg: var(--color-white);
	--color-bg-dark: var(--color-dark-green);
	--color-accent: var(--color-yellow);
	--color-primary: var(--color-bright-green);

	/* Font families (loaded via Google Fonts in functions.php) */
	--font-primary: "Lato", "Lato Fallback", sans-serif;
	--font-secondary: "Poppins", "Poppins Fallback", sans-serif;
	--font-display: "Cormorant Garamond", "Cormorant Garamond Fallback", serif;
	--font-label: "Roboto", "Roboto Fallback", sans-serif;

	/* Font weights */
	--font-weight-regular: 400;
	--font-weight-medium: 500;
	--font-weight-semibold: 600;
	--font-weight-bold: 700;

	/* Shared styles (same mobile / desktop) */
	--font-paragraph-size: 16px;
	--font-paragraph-line: 24px;
	--font-paragraph-weight: var(--font-weight-regular);
	--font-paragraph-tracking: 0;

	--font-h6-size: 16px;
	--font-h6-line: 24px;
	--font-h6-weight: var(--font-weight-bold);
	--font-h6-tracking: 0;

	--font-label-size: 16px;
	--font-label-line: 20px;
	--font-label-weight: var(--font-weight-medium);
	--font-label-tracking: 0.08em; /* 8% */

	--font-button-size: 20px;
	--font-button-line: 20px;
	--font-button-weight: var(--font-weight-bold);
	--font-button-tracking: 0;

	/* Mobile heading defaults (0–767px) — Figma "Mobile/H* - M": Lato Bold Italic (file wxwuK7BpekIvd9pKAYnPC4) */
	--font-h1-family: var(--font-primary);
	--font-h1-size: 44px;
	--font-h1-line: 54px;
	--font-h1-weight: var(--font-weight-bold);
	--font-h1-style: italic;
	--font-h1-tracking: 0;

	--font-h2-family: var(--font-primary);
	--font-h2-size: 38px;
	--font-h2-line: 48px;
	--font-h2-weight: var(--font-weight-bold);
	--font-h2-style: italic;
	--font-h2-tracking: 0;

	--font-h3-family: var(--font-primary);
	--font-h3-size: 30px;
	--font-h3-line: 38px;
	--font-h3-weight: var(--font-weight-bold);
	--font-h3-style: italic;
	--font-h3-tracking: 0;

	--font-h4-family: var(--font-primary);
	--font-h4-size: 24px;
	--font-h4-line: 32px;
	--font-h4-weight: var(--font-weight-bold);
	--font-h4-style: italic;
	--font-h4-tracking: 0;

	/* No mobile H5 style in Figma: Lato, size/style unchanged */
	--font-h5-family: var(--font-primary);
	--font-h5-size: 24px;
	--font-h5-line: 32px;
	--font-h5-weight: var(--font-weight-bold);
	--font-h5-style: normal;
	--font-h5-tracking: 0;
}

/* Tablet + Desktop (768px+) — Lato Bold / Bold Italic */
@media (min-width: 768px) {
	:root {
		--font-h1-family: var(--font-primary);
		--font-h1-size: 64px;
		--font-h1-line: 74px;
		--font-h1-weight: var(--font-weight-bold);
		--font-h1-style: italic;
		--font-h1-tracking: 0;

		--font-h2-family: var(--font-primary);
		--font-h2-size: 44px;
		--font-h2-line: 54px;
		--font-h2-weight: var(--font-weight-bold);
		--font-h2-style: italic;
		--font-h2-tracking: 0.0075em; /* 0.75% */

		--font-h3-family: var(--font-primary);
		--font-h3-size: 34px;
		--font-h3-line: 44px;
		--font-h3-weight: var(--font-weight-bold);
		--font-h3-style: italic;
		--font-h3-tracking: 0;

		--font-h4-family: var(--font-primary);
		--font-h4-size: 28px;
		--font-h4-line: 38px;
		--font-h4-weight: var(--font-weight-bold);
		--font-h4-style: italic;
		--font-h4-tracking: -0.005em; /* -0.5% */

		--font-h5-family: var(--font-primary);
		--font-h5-size: 20px;
		--font-h5-line: 30px;
		--font-h5-weight: var(--font-weight-bold);
		--font-h5-style: normal;
		--font-h5-tracking: 0;
	}
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
	width: 100%;
	max-width: 1920px;
	margin-left: auto;
	margin-right: auto;
	color: var(--color-text);
	font-family: var(--font-primary);
	font-size: var(--font-paragraph-size);
	font-weight: var(--font-paragraph-weight);
	letter-spacing: var(--font-paragraph-tracking);
	line-height: var(--font-paragraph-line);
	background-color: var(--color-bg);
}

/* Full-width pages & posts (no sidebar) */
body.full-width.no-sidebar #page,
body.full-width.no-sidebar .site-main,
body.full-width.no-sidebar .site-main > article {
	width: 100%;
	max-width: 100%;
}

body.full-width.no-sidebar .site-main {
	float: none;
	margin: 0;
	padding: 0;
}

body.full-width.no-sidebar #secondary {
	display: none;
}

/* ==========================================================================
   Typography — Elements
   ========================================================================== */

/* Spans inherit parent typography unless a more specific rule sets otherwise. */
span {
	font-family: inherit;
	font-size: inherit;
	font-style: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
}

h1,
.h1 {
	font-family: var(--font-h1-family);
	font-size: var(--font-h1-size);
	font-style: var(--font-h1-style);
	font-weight: var(--font-h1-weight);
	letter-spacing: var(--font-h1-tracking);
	line-height: var(--font-h1-line);
	text-transform: capitalize;
}

h2,
.h2 {
	font-family: var(--font-h2-family);
	font-size: var(--font-h2-size);
	font-style: var(--font-h2-style);
	font-weight: var(--font-h2-weight);
	letter-spacing: var(--font-h2-tracking);
	line-height: var(--font-h2-line);
	text-transform: capitalize;
}

h3,
.h3 {
	font-family: var(--font-h3-family);
	font-size: var(--font-h3-size);
	font-style: var(--font-h3-style);
	font-weight: var(--font-h3-weight);
	letter-spacing: var(--font-h3-tracking);
	line-height: var(--font-h3-line);
	text-transform: capitalize;
}

h4,
.h4 {
	font-family: var(--font-h4-family);
	font-size: var(--font-h4-size);
	font-style: var(--font-h4-style);
	font-weight: var(--font-h4-weight);
	letter-spacing: var(--font-h4-tracking);
	line-height: var(--font-h4-line);
	text-transform: capitalize;
}

h5,
.h5 {
	font-family: var(--font-h5-family);
	font-size: var(--font-h5-size);
	font-style: var(--font-h5-style);
	font-weight: var(--font-h5-weight);
	letter-spacing: var(--font-h5-tracking);
	line-height: var(--font-h5-line);
	text-transform: capitalize;
}

h6,
.h6 {
	font-family: var(--font-primary);
	font-size: var(--font-h6-size);
	font-style: normal;
	font-weight: var(--font-h6-weight);
	letter-spacing: var(--font-h6-tracking);
	line-height: var(--font-h6-line);
}

p,
.paragraph {
	font-family: var(--font-primary);
	font-size: var(--font-paragraph-size);
	font-style: normal;
	font-weight: var(--font-paragraph-weight);
	letter-spacing: var(--font-paragraph-tracking);
	line-height: var(--font-paragraph-line);
}

.label {
	font-family: var(--font-label);
	font-size: var(--font-label-size);
	font-style: normal;
	font-weight: var(--font-label-weight);
	letter-spacing: var(--font-label-tracking);
	line-height: var(--font-label-line);
	text-transform: uppercase;
}

/* ==========================================================================
   Buttons — Figma Button Assets (apply for all buttons)
   https://www.figma.com/design/peSJIVMSSVsLqGYh3mq9BV/?node-id=21337-6555
   ========================================================================== */

.btn,
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--btn-gap);
	box-sizing: border-box;
	padding: var(--btn-padding-y) var(--btn-padding-x);
	border: 1px solid transparent;
	border-radius: var(--btn-radius);
	font-family: var(--font-primary);
	font-size: var(--font-button-size);
	font-style: normal;
	font-weight: var(--font-button-weight);
	letter-spacing: var(--font-button-tracking);
	line-height: var(--font-button-line);
	text-align: center;
	text-decoration: none;
	text-transform: capitalize;
	white-space: nowrap;
	cursor: pointer;
	transition: var(--btn-transition);
}

.btn--lg,
.button--lg {
	padding: var(--btn-padding-y-lg) var(--btn-padding-x);
}

.btn__arrow,
.button__arrow {
	display: block;
	flex-shrink: 0;
	width: 20px;
	height: auto;
}

/*
 * Light surface — Primary (e.g. Get Quotation)
 * Default: Yellow / Black → Hover: Lime @ 80% → Active: Bright Green / White → Disabled @ 50%
 */
.btn--primary,
.btn--primary:visited,
.button--primary,
.button--primary:visited {
	background-color: var(--color-yellow);
	border-color: var(--color-yellow);
	color: var(--color-black);
}

.btn--primary:hover,
.btn--primary:focus,
.button--primary:hover,
.button--primary:focus {
	background-color: var(--color-lime);
	border-color: var(--color-lime);
	color: var(--color-black);
	opacity: var(--btn-hover-opacity);
}

.btn--primary:active,
.button--primary:active {
	background-color: var(--color-bright-green);
	border-color: var(--color-bright-green);
	color: var(--color-white);
	opacity: 1;
}

/*
 * Light surface — Secondary (e.g. Submit Enquiry + arrow)
 * Default: Lime / Bright Green → Hover: Yellow @ 80% → Active: Bright Green / White → Disabled @ 50%
 */
.btn--secondary,
.btn--secondary:visited,
.button--secondary,
.button--secondary:visited {
	background-color: var(--color-lime);
	border-color: var(--color-lime);
	color: var(--color-bright-green);
	padding: var(--btn-padding-y-lg) var(--btn-padding-x);
}

.btn--secondary:hover,
.btn--secondary:focus,
.button--secondary:hover,
.button--secondary:focus {
	background-color: var(--color-yellow);
	border-color: var(--color-yellow);
	color: var(--color-black);
	opacity: var(--btn-hover-opacity);
}

.btn--secondary:active,
.button--secondary:active {
	background-color: var(--color-bright-green);
	border-color: var(--color-bright-green);
	color: var(--color-white);
	opacity: 1;
}

/*
 * Dark surface — Primary (e.g. Make An Enquiry)
 * Default: Yellow / Bright Green → Hover: Lime / Bright Green → Active: Lime / Black → Disabled @ 50%
 */
.btn--primary-on-dark,
.btn--primary-on-dark:visited,
.button--primary-on-dark,
.button--primary-on-dark:visited {
	background-color: var(--color-yellow);
	border-color: var(--color-yellow);
	color: var(--color-bright-green);
	padding: var(--btn-padding-y-lg) var(--btn-padding-x);
}

.btn--primary-on-dark:hover,
.btn--primary-on-dark:focus,
.button--primary-on-dark:hover,
.button--primary-on-dark:focus {
	background-color: var(--color-lime);
	border-color: var(--color-lime);
	color: var(--color-bright-green);
	opacity: 1;
}

.btn--primary-on-dark:active,
.button--primary-on-dark:active {
	background-color: var(--color-lime);
	border-color: var(--color-lime);
	color: var(--color-black);
	opacity: 1;
}

/*
 * Dark surface — Outline (e.g. View Services + arrow)
 * Default: White border / White → Hover: White fill / Bright Green → Active: Yellow / Black → Disabled @ 50%
 */
.btn--outline,
.btn--outline:visited,
.button--outline,
.button--outline:visited {
	background-color: transparent;
	border-color: var(--color-white);
	color: var(--color-white);
	padding: var(--btn-padding-y-lg) var(--btn-padding-x);
}

.btn--outline:hover,
.btn--outline:focus,
.button--outline:hover,
.button--outline:focus {
	background-color: var(--color-white);
	border-color: var(--color-bright-green);
	color: var(--color-bright-green);
	opacity: 1;
}

.btn--outline:active,
.button--outline:active {
	background-color: var(--color-yellow);
	border-color: var(--color-yellow);
	color: var(--color-black);
	opacity: 1;
}

/* Disabled — all variants (Figma: 50% opacity of default look) */
.btn:disabled,
.button:disabled,
.btn[aria-disabled="true"],
.button[aria-disabled="true"],
.btn--disabled,
.button--disabled {
	opacity: var(--btn-disabled-opacity);
	cursor: not-allowed;
	pointer-events: none;
}

.btn:disabled:hover,
.btn:disabled:focus,
.btn:disabled:active,
.button:disabled:hover,
.button:disabled:focus,
.button:disabled:active,
.btn[aria-disabled="true"]:hover,
.btn[aria-disabled="true"]:focus,
.btn[aria-disabled="true"]:active,
.button[aria-disabled="true"]:hover,
.button[aria-disabled="true"]:focus,
.button[aria-disabled="true"]:active,
.btn--disabled:hover,
.btn--disabled:focus,
.btn--disabled:active,
.button--disabled:hover,
.button--disabled:focus,
.button--disabled:active {
	opacity: var(--btn-disabled-opacity);
}

/* Inherit list / link / emphasis styles from surrounding text */
a,
strong,
b,
em,
i,
u,
ul,
ol,
li {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
}

strong,
b {
	font-weight: var(--font-weight-bold);
}

em,
i {
	font-style: italic;
}
