/**
 * Adelaide Hills Packaging — child theme styles.
 *
 * Colour and font values come from Elementor Site Settings globals wherever one
 * exists; the hex after each var() is only the fallback for before those globals
 * are set. Set Site Settings to match (CLAUDE.md):
 *   Primary   #1F3A52 navy        Secondary #7E9A6C sage
 *   Text      #1F3A52 navy        Accent    #C8683A terracotta
 */

/* ---------------------------------------------------------------- fonts --- */
/* Self-hosted. No Google Fonts CDN (CLAUDE.md). */

@font-face {
	font-family: 'DM Serif Display';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/dm-serif-display-400.woff2') format('woff2');
}

@font-face {
	font-family: 'DM Serif Display';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/dm-serif-display-400-italic.woff2') format('woff2');
}

/* Source Sans 3 ships as a variable font: one file covers 400–700. */
@font-face {
	font-family: 'Source Sans 3';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/source-sans-3-variable.woff2') format('woff2');
}

/* --------------------------------------------------------------- tokens --- */

:root {
	--ahp-navy: var(--e-global-color-primary, #1F3A52);
	--ahp-cream: #F3EBDA;
	--ahp-terracotta: var(--e-global-color-accent, #C8683A);
	--ahp-sage: var(--e-global-color-secondary, #7E9A6C);
	--ahp-tan: #C9A66B;

	/*
	 * Terracotta dark enough for cream text at normal size (4.52:1). Only needed
	 * where a terracotta surface carries text below the large-text threshold --
	 * see the button rules below.
	 */
	--ahp-terracotta-ink: #A45530;

	--ahp-font-heading: 'DM Serif Display', Georgia, 'Times New Roman', serif;
	--ahp-font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	--ahp-radius: 4px;
	--ahp-transition: 160ms ease;
}

/* ----------------------------------------------------------- typography --- */

body {
	font-family: var(--ahp-font-body);
	color: var(--ahp-navy);
	background-color: var(--ahp-cream);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ahp-font-heading);
	font-weight: 400;
	letter-spacing: 0.01em;
}

/* -------------------------------------------------------------- buttons --- */

/*
 * Cream on terracotta is 3.22:1. That clears WCAG AA only under the large-text
 * rule (>=18.66px bold), which is why the size and weight below are not
 * decorative -- dropping either breaks AA. If a smaller button label is ever
 * needed, switch its background to --ahp-terracotta-ink instead.
 */
.ahp-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
	font-family: var(--ahp-font-body);
	font-size: 1.1875rem; /* 19px — above the 18.66px large-text threshold */
	font-weight: 700;
	line-height: 1.2;
	padding: 0.7em 1.5em;
	border: 2px solid transparent;
	border-radius: var(--ahp-radius);
	background-color: var(--ahp-terracotta);
	color: var(--ahp-cream);
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--ahp-transition), transform var(--ahp-transition);
}

.ahp-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	background-color: var(--ahp-terracotta-ink);
	color: var(--ahp-cream);
}

/* Secondary: outlined navy, for "Get a freight quote" and similar. */
.ahp-button--secondary {
	background-color: transparent;
	color: var(--ahp-navy);
	border-color: var(--ahp-navy);
}

.ahp-button--secondary:hover {
	background-color: var(--ahp-navy);
	color: var(--ahp-cream);
}

/* ---------------------------------------------------------- trust strip --- */

.ahp-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ahp-trust__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 1 1 14rem;
	justify-content: center;
	text-align: left;
}

.ahp-trust__icon {
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
}

.ahp-trust__label {
	font-weight: 600;
	line-height: 1.3;
}

/* --------------------------------------------------------- product card --- */

.woocommerce ul.products li.product {
	transition: transform var(--ahp-transition), box-shadow var(--ahp-transition);
}

.woocommerce ul.products li.product:hover,
.woocommerce ul.products li.product:focus-within {
	transform: translateY(-3px);
	box-shadow: 0 6px 18px rgba(31, 58, 82, 0.14);
}

.woocommerce ul.products li.product img {
	border-radius: var(--ahp-radius);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--ahp-font-heading);
}

/* Nobody wants a hover lurch if they have asked the OS to stop animating. */
@media (prefers-reduced-motion: reduce) {
	.ahp-button,
	.woocommerce ul.products li.product {
		transition: none;
	}

	.woocommerce ul.products li.product:hover,
	.woocommerce ul.products li.product:focus-within {
		transform: none;
	}
}

/* --------------------------------------------------------------- focus --- */

/*
 * :focus-visible only, so a mouse click does not leave a ring behind but every
 * keyboard user gets one. The 3px navy outline is 9.92:1 on cream.
 */
:focus-visible {
	outline: 3px solid var(--ahp-navy);
	outline-offset: 2px;
	border-radius: 2px;
}

/* On navy surfaces the navy ring would vanish, so flip it to cream. */
.ahp-on-navy :focus-visible {
	outline-color: var(--ahp-cream);
}

.ahp-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background-color: var(--ahp-navy);
	color: var(--ahp-cream);
	font-weight: 600;
}

.ahp-skip-link:focus {
	left: 0;
}
