/* Base body styles and site-wide foundations.
   Loaded after reset.css and vars.css. */

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

body {
	background-image: radial-gradient(rgba(42, 48, 64, 1), rgba(26, 32, 40, 1));
	background-attachment: fixed;
	color: var(--color-gunmetal);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	font-weight: var(--fw-body);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
	overflow-x: hidden;
}

main {
	background-color: var(--color-ivory);
	position: relative;
	z-index: var(--z-content);
}

/* Paper grain texture — covers the ivory main wrapper only */
main::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.04;
	background-image: url('../img/grain.svg');
	background-size: 200px 200px;
	mix-blend-mode: multiply;
	z-index: var(--z-overlay);
}

/* ---------- Typography defaults ---------- */
h1, h2, h3 {
	font-family: var(--font-display);
	font-weight: var(--fw-display);
	line-height: var(--lh-tight);
	color: var(--color-gunmetal);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p {
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

p + p {
	margin-top: 1em;
}

a {
	color: var(--color-slate);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover,
a:focus-visible {
	color: var(--color-sage);
}

strong { font-weight: 600; }
em     { font-style: italic; }

/* ---------- Section layout primitive ---------- */
.section {
	padding: var(--section-padding-v-desktop) var(--content-padding);
	position: relative;
	z-index: var(--z-content);
}

@media (max-width: 1280px) {
	.section {
		padding: var(--section-padding-v-tablet) 32px;
	}
}

@media (max-width: 430px) {
	.section {
		padding: var(--section-padding-v-mobile) 24px;
	}
}

/* ---------- Floating contact button ---------- */
.float-contact {
	position: fixed;
	bottom: 32px;
	right: 32px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: var(--color-sage);
	color: var(--color-near-white);
	box-shadow: 0 4px 16px rgba(26, 32, 40, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: var(--z-float);
	cursor: pointer;
	opacity: 0;
	transform: scale(0.8);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.15s ease;
}

.float-contact.is-visible {
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
}

.float-contact:hover,
.float-contact:focus-visible {
	background-color: var(--color-gunmetal);
}

@media (max-width: 430px) {
	.float-contact { bottom: 20px; right: 20px; width: 48px; height: 48px; }
}

/* ---------- Accessibility ---------- */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

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

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