/*
 * MFD — Design System
 * Tokens, reset, base elements, accessibility and generic utilities.
 * Component & per-area styles live in header-footer.css / home.css / pages.css /
 * woocommerce.css. Derived from docs/DESIGN-SPEC.md §1.
 */

/* ============================================================
 * 1. DESIGN TOKENS
 * ============================================================ */
:root {
	/* Brand colors */
	--mfd-tan: #D5A95F;
	--mfd-tan-dark: #B98E47;
	--mfd-cream: #FFF6EA;
	--mfd-cream-soft: #FCF2DE;
	--mfd-ink: #000000;
	--mfd-white: #FFFFFF;
	--mfd-muted: #7D7A7A;
	--mfd-line: #E8DFC9;
	--mfd-product-tile: #FBF6E9;
	--mfd-gallery-base: #F0EAD8;

	/* Status */
	--mfd-status-delivered: #5B8C5A;
	--mfd-status-shipped: #D5A95F;

	/* Typography */
	--mfd-font-display: "Anton", Impact, "Arial Narrow", sans-serif;
	--mfd-font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mfd-font-serif: "Lora", Georgia, "Times New Roman", serif;

	/* Layout */
	--mfd-container: 1280px;
	--mfd-container-wide: 1600px;
	--mfd-gutter: 24px;

	/* Spacing rhythm */
	--mfd-section-y: clamp(40px, 6vw, 72px);
	--mfd-grid-gap: clamp(16px, 2.5vw, 28px);

	/* Borders */
	--mfd-border: 1px solid var(--mfd-line);
	--mfd-frame: 1px solid var(--mfd-tan);

	/* Elevation */
	--mfd-shadow-header: 0 1px 0 rgba(0, 0, 0, 0.04);
	--mfd-shadow-pop: 0 12px 28px rgba(0, 0, 0, 0.2);
	--mfd-shadow-toast: 0 12px 32px rgba(0, 0, 0, 0.25);

	/* Z-index scale */
	--mfd-z-header: 100;
	--mfd-z-drawer: 200;
	--mfd-z-toast: 300;

	/* Motion */
	--mfd-transition: 0.25s ease;
}

/* ============================================================
 * 2. RESET
 * ============================================================ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
	margin: 0;
}

ul[class],
ol[class] {
	margin: 0;
	padding: 0;
	list-style: none;
}

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

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
	margin: 0;
}

button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

table {
	border-collapse: collapse;
	width: 100%;
}

/* ============================================================
 * 3. BASE ELEMENTS
 * ============================================================ */
body {
	font-family: var(--mfd-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--mfd-ink);
	background: var(--mfd-white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	transition: color var(--mfd-transition), opacity var(--mfd-transition);
}

a:hover {
	color: var(--mfd-tan-dark);
}

strong, b {
	font-weight: 700;
}

::selection {
	background: var(--mfd-tan);
	color: var(--mfd-white);
}

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

.mfd-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: 12px 20px;
	background: var(--mfd-ink);
	color: var(--mfd-white);
	font-weight: 700;
	font-size: 13px;
}

.mfd-skip-link:focus {
	left: 8px;
	top: 8px;
}

:focus-visible {
	outline: 2px solid var(--mfd-tan);
	outline-offset: 2px;
}

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

/* ============================================================
 * 5. LAYOUT UTILITIES
 * ============================================================ */
.mfd-container {
	width: 100%;
	max-width: calc(var(--mfd-container) + var(--mfd-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--mfd-gutter);
}

.mfd-container--wide {
	max-width: calc(var(--mfd-container-wide) + var(--mfd-gutter) * 2);
}

.mfd-container--narrow {
	max-width: 840px;
}

.mfd-section {
	padding-block: var(--mfd-section-y);
}

.mfd-section--cream {
	background: var(--mfd-cream);
}

.mfd-section--cream-soft {
	background: var(--mfd-cream-soft);
}

.mfd-main {
	display: block;
}

.mfd-grid-4 {
	display: grid;
	gap: var(--mfd-grid-gap);
	grid-template-columns: repeat(4, 1fr);
}

.mfd-grid-3 {
	display: grid;
	gap: var(--mfd-grid-gap);
	grid-template-columns: repeat(3, 1fr);
}

/* ============================================================
 * 6. TYPOGRAPHY UTILITIES
 * ============================================================ */
.mfd-display {
	font-family: var(--mfd-font-display);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1;
}

.mfd-overlay {
	font-family: var(--mfd-font-display);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 0.95;
	color: var(--mfd-white);
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mfd-serif {
	font-family: var(--mfd-font-serif);
}

.mfd-italic {
	font-style: italic;
	font-weight: 800;
}

.mfd-eyebrow {
	font-family: var(--mfd-font-body);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--mfd-tan);
}

.mfd-section-title {
	font-family: var(--mfd-font-body);
	font-weight: 800;
	font-style: italic;
	font-size: clamp(24px, 4vw, 38px);
	letter-spacing: -0.01em;
	line-height: 1.1;
}

.mfd-page-title {
	font-family: var(--mfd-font-body);
	font-weight: 800;
	font-style: italic;
	font-size: clamp(28px, 5vw, 48px);
	line-height: 1.1;
}

.mfd-text-tan {
	color: var(--mfd-tan);
}

.mfd-text-muted {
	color: var(--mfd-muted);
}

.mfd-text-center {
	text-align: center;
}

/* ============================================================
 * 7. BUTTONS
 * ============================================================ */
.mfd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--mfd-font-body);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1;
	padding: 14px 28px;
	border: 1.5px solid transparent;
	background: var(--mfd-tan);
	color: var(--mfd-white);
	cursor: pointer;
	text-align: center;
	transition: background var(--mfd-transition), color var(--mfd-transition), opacity var(--mfd-transition);
}

.mfd-btn:hover {
	color: var(--mfd-white);
}

.mfd-btn--primary {
	background: var(--mfd-tan);
	color: var(--mfd-white);
}

.mfd-btn--primary:hover {
	background: var(--mfd-tan-dark);
}

.mfd-btn--dark {
	background: var(--mfd-ink);
	color: var(--mfd-white);
}

.mfd-btn--dark:hover {
	opacity: 0.85;
}

.mfd-btn--outline {
	background: transparent;
	color: var(--mfd-ink);
	border-color: var(--mfd-ink);
}

.mfd-btn--outline:hover {
	background: var(--mfd-ink);
	color: var(--mfd-white);
}

.mfd-btn--pill {
	border-radius: 999px;
}

.mfd-btn[disabled],
.mfd-btn--disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ============================================================
 * 8. FORM CONTROLS (base)
 * ============================================================ */
.mfd-input,
.mfd-textarea,
.mfd-select,
input[type="text"].mfd-field,
input[type="email"].mfd-field,
input[type="tel"].mfd-field,
input[type="search"].mfd-field,
textarea.mfd-field {
	width: 100%;
	padding: 12px 14px;
	font-family: var(--mfd-font-body);
	font-size: 14px;
	color: var(--mfd-ink);
	background: var(--mfd-white);
	border: 1px solid var(--mfd-line);
	border-radius: 0;
}

.mfd-input:focus,
.mfd-textarea:focus,
.mfd-field:focus {
	outline: none;
	border-color: var(--mfd-tan);
}

.mfd-input::placeholder,
.mfd-textarea::placeholder,
.mfd-field::placeholder {
	font-style: italic;
	color: var(--mfd-muted);
}

.mfd-textarea {
	min-height: 130px;
	resize: vertical;
}

.mfd-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 6px;
}

/* ============================================================
 * 9. ICONS & MEDIA
 * ============================================================ */
.mfd-icon {
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}

.mfd-frame {
	border: var(--mfd-frame);
}

.mfd-cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ============================================================
 * 10. WORDPRESS CORE
 * ============================================================ */
.alignwide {
	max-width: var(--mfd-container-wide);
}

.alignfull {
	max-width: none;
}

/* ------------------------------------------------------------
 * Google website-translation engine — suppress its injected UI.
 * The MFD language selector drives translation; Google's own
 * banner, tooltip and gadget must never be visible.
 * ------------------------------------------------------------ */
#google_translate_element {
	display: none !important;
}

.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-balloon-frame,
iframe.skiptranslate,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.gtranslate_wrapper,
[class*="gt_float"] {
	display: none !important;
}

body {
	top: 0 !important;
}

.goog-text-highlight {
	background: none !important;
	box-shadow: none !important;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.wp-element-caption {
	font-size: 13px;
	font-style: italic;
	color: var(--mfd-muted);
	text-align: center;
	padding-top: 8px;
}

.mfd-empty {
	padding: 48px 0;
	text-align: center;
	color: var(--mfd-muted);
	font-style: italic;
}

/* ============================================================
 * 11. RESPONSIVE — generic grid collapse (DESIGN-SPEC §1.5)
 * ============================================================ */
@media (max-width: 960px) {
	.mfd-grid-4 {
		grid-template-columns: repeat(2, 1fr);
	}
	.mfd-grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.mfd-grid-4 {
		grid-template-columns: repeat(2, 1fr);
	}
	.mfd-grid-3 {
		grid-template-columns: 1fr;
	}
}

/* DESIGN-SPEC §1.5: product grids stay 2-up at ≤640px — never 1-column on phone.
   Remove the 420px 1-column rule that would break 390px viewports. */
