/*
 * Base styles and design tokens.
 * Brand palette and fonts come from the logo package (see CLAUDE.md,
 * "Logo i vizuelni identitet"). Widgets use only these variables, never raw values.
 */

:root {
	/* Brand colors */
	--mj-graphite: #16181d;
	--mj-orange: #ff5b14;
	/* Darker orange for text on light backgrounds (contrast 4.7 on white; the brand orange has 3.1) */
	--mj-orange-deep: #cf4309;
	--mj-cream: #f2f0eb;

	/* Fonts */
	--mj-font-display: 'Archivo', system-ui, sans-serif;
	--mj-font-text: 'Inter', system-ui, sans-serif;

	/* Structure */
	--mj-container: 1200px;
	--mj-gutter: 1.25rem;
	--mj-lh-display: 1.08;
	--mj-radius: 0.25rem;
}

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

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

body {
	margin: 0;
	background: var(--mj-cream);
	color: var(--mj-graphite);
	font-family: var(--mj-font-text);
	line-height: 1.5;
}

h1,
h2,
h3,
h4 {
	font-family: var(--mj-font-display);
	font-weight: 800;
	line-height: var(--mj-lh-display);
}

img {
	max-width: 100%;
	height: auto;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mj-skip-link:focus {
	position: fixed;
	left: var(--mj-gutter);
	top: var(--mj-gutter);
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1.25rem;
	clip: auto;
	background: var(--mj-orange);
	color: var(--mj-graphite);
	font-weight: 600;
}

:focus-visible {
	outline: 2px solid var(--mj-orange);
	outline-offset: 3px;
}

.mj-container {
	width: min(100% - 2 * var(--mj-gutter), var(--mj-container));
	margin-inline: auto;
}

/* Kicker: small label above a heading */
.mj-kicker {
	margin: 0 0 1rem;
	font-family: var(--mj-font-display);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mj-orange);
}

/* Eyebrow: short orange rule + label above a section heading (same as in the hero) */
.mj-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.25rem;
	color: rgba(22, 24, 29, 0.72);
	font-size: 0.9375rem;
	font-weight: 600;
}

.mj-eyebrow::before {
	content: '';
	flex: none;
	width: 2rem;
	height: 2px;
	background: var(--mj-orange);
}

/* Buttons */
.mj-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 3rem;
	padding: 0 1.5rem;
	border: 1px solid var(--mj-orange);
	border-radius: var(--mj-radius);
	background: var(--mj-orange);
	color: var(--mj-graphite);
	font-family: var(--mj-font-text);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

/* Hover inverts to the opposite of the surface: set --mj-btn-hover-* on dark surfaces */
.mj-btn:hover {
	border-color: var(--mj-btn-hover-bg, var(--mj-graphite));
	background: var(--mj-btn-hover-bg, var(--mj-graphite));
	color: var(--mj-btn-hover-fg, var(--mj-cream));
}

.mj-btn--sm {
	min-height: 2.5rem;
	padding: 0 1.125rem;
}

/* Outline: takes the text color of its surface */
.mj-btn--ghost {
	border-color: currentColor;
	background: transparent;
	color: inherit;
}

.mj-icon {
	width: 1.125rem;
	height: 1.125rem;
	flex: none;
}

/*
 * Reveal on scroll (assets/js/motion.js adds .mj-reveal / .is-in only to elements below the
 * first screen): a short fade and a 1rem rise, calm ease-out, groups slightly staggered.
 */
.mj-reveal {
	opacity: 0;
	transform: translateY(1rem);
	transition:
		opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) var(--mj-reveal-delay, 0ms),
		transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) var(--mj-reveal-delay, 0ms);
}

.mj-reveal.is-in {
	opacity: 1;
	transform: none;
}

/*
 * Hover (pointer devices only): photos zoom in very slightly inside their frame,
 * plates get a clearer edge. Nothing moves the layout.
 */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.mj-service__media,
	.mj-process__photo {
		overflow: hidden;
	}

	.mj-services .mj-service__img,
	.mj-process .mj-process__img {
		transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
	}

	.mj-service:hover .mj-service__img,
	.mj-process__photo:hover .mj-process__img {
		transform: scale(1.035);
	}

	.mj-plate {
		transition: border-color 0.3s;
	}

	.mj-plate:hover {
		border-color: rgba(242, 240, 235, 0.32);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mj-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
