/* Design tokens, fonts and base styles. Values come from the current site (see design brief). */

@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Aclonica"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/aclonica-400.woff2") format("woff2"); }

:root {
	--gg-max: 80rem;
	--gg-gutter: clamp(1rem, 4vw, 4rem);
	--gg-section-space: clamp(3.75rem, 8vw, 7.5rem);
	--gg-header-offset: 9.75rem;

	--gg-ink: #171512;
	--gg-muted: #625d56;
	--gg-paper: #fff;
	--gg-warm: #f6f1e9;
	--gg-warm-deep: #e9dfd1;
	--gg-inverse: #111;
	--gg-inverse-soft: #1a1917;
	--gg-inverse-text: #f8f5ef;
	--gg-inverse-muted: #c9c2b7;
	--gg-line: #ded6cb;
	--gg-accent: #ffc333;
	--gg-accent-strong: #e5aa2e;
	--gg-accent-ink: #1b1500;
	--gg-link: #765000;
	--gg-focus: #075fae;
	--gg-badge: #83b735;
	--gg-sale: #b3261e;
	--gg-success: #2e6b2f;
	--gg-footer-bg: #f9f9f9;
	--gg-text-soft: #333;
	--gg-muted-2: #666;
	--gg-line-soft: #ececec;
	--gg-input-border: #cfc8bd;
	--gg-icon-muted: #9a8f80;
	--gg-crumb-sep: #b3aa9d;
	--gg-ok-bg: #f1f7ea;
	--gg-err-bg: #fdf1ef;
	--gg-subtle-bg: #fbfaf8;
	--gg-stock-low: #8a5a00;
	--gg-scroll-thumb: #c9c0b3;
	--gg-scroll-thumb-hover: #a99f91;

	/* Surfaces. Raised surfaces (--gg-warm) must stand apart from the page in both themes. */
	--gg-header-bg: #fff;
	--gg-home-bg: var(--gg-warm);
	--gg-raised-edge: transparent; /* hairline around raised panels (dark theme only) */
	/* Feature bands: always dark with light text, in both themes (blog post header, contact
	   header, call-to-action and help banners). Text colours are fixed, never theme tokens. */
	--gg-band-bg: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
	--gg-band-text: #f8f5ef;
	--gg-band-muted: #d6cfc4;
	--gg-band-edge: transparent;

	--gg-radius-sm: .5rem;
	--gg-radius-md: 1rem;
	--gg-radius-lg: 1.5rem;
	--gg-shadow: 0 1rem 3rem rgba(44, 34, 20, .1);
	--gg-motion-fast: 140ms;
	--gg-motion-base: 220ms;
	--gg-motion-section: 320ms;
	--gg-ease: cubic-bezier(.22, 1, .36, 1);

	--gg-font-body: "Lato", Arial, sans-serif;
	--gg-font-heading: "Poppins", "Lato", Arial, sans-serif;
	--gg-font-display: "Aclonica", "Lato", Arial, sans-serif;

	color-scheme: light;
}

/* Dark theme (UI-004): follows the device setting unless the visitor picked one with the
   header toggle, which theme-init.js applies as data-theme before the page paints. */
:root[data-theme="dark"] {
	--gg-ink: #f4f0e9;
	--gg-muted: #bdb5aa;
	--gg-paper: #121110;
	--gg-header-bg: #1c1a17;
	--gg-home-bg: var(--gg-paper);
	--gg-raised-edge: #3b352e;
	--gg-band-bg: linear-gradient(135deg, #2c2620 0%, #3d342a 100%);
	--gg-band-edge: rgba(255, 195, 51, .28);
	--gg-warm: #26221d; /* raised panels: lighter than the page, not darker */
	--gg-warm-deep: #322c25;
	--gg-inverse: #0a0908;
	--gg-inverse-soft: #1a1917;
	--gg-line: #3b352e;
	--gg-link: #ffc333;
	--gg-focus: #ffc333;
	--gg-sale: #ff8a80;
	--gg-success: #8fd18f;
	--gg-footer-bg: #0d0c0b;
	--gg-text-soft: #e0dbd3;
	--gg-muted-2: #b0a89c;
	--gg-line-soft: #2b2722;
	--gg-input-border: #4a443d;
	--gg-icon-muted: #8f877c;
	--gg-crumb-sep: #6f675d;
	--gg-ok-bg: #16231a;
	--gg-err-bg: #2a1614;
	--gg-subtle-bg: #1c1a17;
	--gg-stock-low: #ffc333;
	--gg-scroll-thumb: #4a443d;
	--gg-scroll-thumb-hover: #6a6157;
	--gg-shadow: 0 1rem 3rem rgba(0, 0, 0, .45);
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--gg-ink: #f4f0e9;
		--gg-muted: #bdb5aa;
		--gg-paper: #121110;
		--gg-header-bg: #1c1a17;
		--gg-home-bg: var(--gg-paper);
		--gg-raised-edge: #3b352e;
		--gg-band-bg: linear-gradient(135deg, #2c2620 0%, #3d342a 100%);
		--gg-band-edge: rgba(255, 195, 51, .28);
		--gg-warm: #26221d; /* raised panels: lighter than the page, not darker */
		--gg-warm-deep: #322c25;
		--gg-inverse: #0a0908;
		--gg-inverse-soft: #1a1917;
		--gg-line: #3b352e;
		--gg-link: #ffc333;
		--gg-focus: #ffc333;
		--gg-sale: #ff8a80;
		--gg-success: #8fd18f;
		--gg-footer-bg: #0d0c0b;
		--gg-text-soft: #e0dbd3;
		--gg-muted-2: #b0a89c;
		--gg-line-soft: #2b2722;
		--gg-input-border: #4a443d;
		--gg-icon-muted: #8f877c;
		--gg-crumb-sep: #6f675d;
		--gg-ok-bg: #16231a;
		--gg-err-bg: #2a1614;
		--gg-subtle-bg: #1c1a17;
		--gg-stock-low: #ffc333;
		--gg-scroll-thumb: #4a443d;
		--gg-scroll-thumb-hover: #6a6157;
		--gg-shadow: 0 1rem 3rem rgba(0, 0, 0, .45);
		color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	overflow-x: clip;
}

body {
	margin: 0;
	min-height: 100vh;
	color: var(--gg-ink);
	background: var(--gg-paper);
	font-family: var(--gg-font-body);
	font-size: 1rem;
	line-height: 1.6;
	overflow-x: clip;
}

h1, h2, h3, h4 {
	margin: 0 0 .5em;
	color: inherit;
	font-family: var(--gg-font-heading);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.01em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

p { margin: 0 0 1em; }

a { color: var(--gg-link); text-underline-offset: .2em; }
a:hover { color: var(--gg-ink); }

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

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
	outline: 3px solid var(--gg-focus);
	outline-offset: 3px;
}

[hidden] { display: none !important; }

main:focus { outline: none; }

.gg-container {
	width: 100%;
	max-width: calc(var(--gg-max) + 2 * var(--gg-gutter));
	margin-inline: auto;
	padding-inline: var(--gg-gutter);
}

.gg-visually-hidden,
.gg-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.gg-skip-link {
	position: fixed;
	z-index: 1000;
	top: 1rem;
	left: 1rem;
	min-height: 2.75rem;
	padding: .7rem 1rem;
	transform: translateY(calc(-100% - 2rem));
	border: 2px solid var(--gg-inverse);
	border-radius: var(--gg-radius-sm);
	color: var(--gg-accent-ink);
	background: var(--gg-accent);
	font-weight: 700;
	text-decoration: none;
	transition: transform var(--gg-motion-fast) ease;
}

.gg-skip-link:focus { transform: translateY(0); }

.gg-eyebrow {
	margin: 0 0 .75rem;
	color: var(--gg-link);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .14em;
	line-height: 1.3;
	text-transform: uppercase;
}

.gg-page { padding-block: clamp(2rem, 5vw, 4rem); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}

/* Dark-theme adjustments that are not plain colour swaps. */
:root[data-theme="dark"] .gg-logo img { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="dark"] .gg-button--dark { color: var(--gg-accent-ink); background: var(--gg-accent); }
:root[data-theme="dark"] .gg-button--dark:hover { background: var(--gg-accent-strong); }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .gg-logo img { filter: invert(1) hue-rotate(180deg); }
	:root:not([data-theme="light"]) .gg-button--dark { color: var(--gg-accent-ink); background: var(--gg-accent); }
	:root:not([data-theme="light"]) .gg-button--dark:hover { background: var(--gg-accent-strong); }
}

/* Scrollbars: slim, theme-coloured, no arrow buttons. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }

::-webkit-scrollbar-thumb {
	border: 2px solid transparent;
	border-radius: 999px;
	background: var(--gg-scroll-thumb) padding-box;
}

::-webkit-scrollbar-thumb:hover { background: var(--gg-scroll-thumb-hover) padding-box; }

/* Firefox has no ::-webkit-scrollbar; its thin scrollbar has no arrows. Chromium ignores
   the ::-webkit rules above if these standard properties are set, so keep them Firefox-only. */
@supports not selector(::-webkit-scrollbar) {
	html, * {
		scrollbar-width: thin;
		scrollbar-color: var(--gg-scroll-thumb) transparent;
	}
}
