/**
 * Frutas de la Tierra - Global Styles
 * Base dark theme, resets, admin bar compensation, skip links, and utilities.
 */

:root {
	--fdt-color-base: #1A1A1A;
	--fdt-color-base-deep: #111111;
	--fdt-color-base-darkest: #0A0A0A;
	--fdt-color-surface: #1E1E1E;
	--fdt-color-accent: #2ECC5A;
	--fdt-color-contrast: #F5F2EC;
	--fdt-color-white: #FFFFFF;
	--fdt-color-on-accent: #08130B;
	--fdt-color-muted: #C2C0BB;
	--fdt-color-border: rgba(245, 242, 236, 0.12);
	--fdt-color-header-glass: rgba(26, 26, 26, 0.88);

	--fdt-font-display: "Bebas Neue", "Impact", "Oswald", "Trebuchet MS", sans-serif;
	--fdt-font-condensed: "Barlow Condensed", "Arial Narrow", "Franklin Gothic Medium", sans-serif;
	--fdt-font-body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--fdt-header-height: 76px;
	--fdt-admin-bar-height: 0px;
}

body.admin-bar {
	--fdt-admin-bar-height: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar {
		--fdt-admin-bar-height: 46px;
	}
}

/* Box sizing and html base */
html {
	box-sizing: border-box;
	background-color: var(--fdt-color-base);
	color: var(--fdt-color-contrast);
	scroll-behavior: smooth;
}

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

body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	background-color: var(--fdt-color-base);
	color: var(--fdt-color-contrast);
	font-family: var(--fdt-font-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

/* Accessible Skip Link */
.fdt-skip-link {
	position: absolute;
	top: -999px;
	left: 20px;
	z-index: 99999;
	padding: 12px 24px;
	background-color: var(--fdt-color-accent);
	color: var(--fdt-color-on-accent);
	font-family: var(--fdt-font-condensed);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	border-radius: 3px;
}

.fdt-skip-link:focus {
	top: calc(var(--fdt-admin-bar-height) + 12px);
}

/* Focus visibility */
:focus-visible {
	outline: 2px solid var(--fdt-color-accent);
	outline-offset: 3px;
}

/* Header site styles */
.fdt-site-header {
	position: fixed;
	top: var(--fdt-admin-bar-height);
	left: 0;
	width: 100%;
	z-index: 1000;
	background-color: var(--fdt-color-header-glass);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--fdt-color-border);
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.fdt-site-header.scrolled {
	background-color: rgba(17, 17, 17, 0.96);
	border-bottom-color: rgba(245, 242, 236, 0.18);
}

.fdt-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--fdt-header-height);
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 40px;
}

@media screen and (max-width: 768px) {
	.fdt-header-inner {
		padding: 0 20px;
	}
}

/* Main content wrapper compensating for fixed header */
.fdt-site-main {
	min-height: calc(100vh - var(--fdt-header-height) - 160px);
}

.fdt-site-main:not(.fdt-hero-page) {
	padding-top: calc(var(--fdt-header-height) + 40px);
}

/* Links & buttons */
a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.18s ease;
}

a:hover {
	color: var(--fdt-color-accent);
}

/* Reduced motion preference */
@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;
		scroll-behavior: auto !important;
	}
}
