/*
  Xestogal S.C.G. -- static site styles
  Hand-authored replacement for the original Neve/Spectra/Otter WordPress stack.
*/

:root {
	--color-primary: #2f5aae;
	--color-text: #272626;
	--color-text-on-dark: #ffffff;
	--color-bg: #ffffff;
	--color-bg-alt: #e9fff8;
	--color-bg-dark: #121212;
	--color-border: #dadada;
	--font-family: Arial, Helvetica, sans-serif;
	--container-width: 1170px;
	--header-height: 70px;
}

/* Reset */

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-height);
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-family);
	font-size: 16px;
	line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	line-height: 1.3;
}

h2 {
	font-size: 28px;
}

h3 {
	font-size: 22px;
	text-align: center;
}

p {
	margin: 0 0 1.25em;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

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

/* <picture> behaves as a plain block box around its <img>, so sizing
   classes on the <img> keep working exactly as before it was wrapped. */
picture {
	display: block;
}

ul {
	margin: 0;
	padding: 0;
}

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 24px;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--color-bg);
	color: var(--color-text);
	padding: 12px 20px;
	z-index: 1000;
}

.skip-link:focus {
	top: 0;
}

/* Header */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	height: var(--header-height);
	background: var(--color-bg);
	border-bottom: 1px solid var(--color-border);
}

.site-header__bar {
	max-width: var(--container-width);
	height: 100%;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.brand__logo {
	width: 130px;
}

.main-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 2rem;
}

.main-nav a {
	color: var(--color-text);
	font-weight: 500;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
	color: var(--color-primary);
	text-decoration: none;
}

.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.menu-toggle__bar {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--color-text);
}

.nav-overlay {
	display: none;
}

@media (max-width: 900px) {
	.main-nav {
		position: fixed;
		top: 0;
		left: 0;
		height: 100vh;
		width: min(320px, 85vw);
		background: var(--color-bg);
		padding-top: calc(var(--header-height) + 1.5rem);
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		z-index: 200;
	}

	.main-nav ul {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.25rem;
		padding: 0 2rem;
	}

	.menu-toggle {
		display: flex;
	}

	body.menu-open .main-nav {
		transform: translateX(0);
	}

	.nav-overlay {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s ease;
		z-index: 150;
	}

	body.menu-open .nav-overlay {
		opacity: 1;
		pointer-events: auto;
	}
}

/* Main content offset for fixed header */

#content {
	padding-top: var(--header-height);
}

/* Hero */

.hero {
	position: relative;
	overflow: hidden;
	min-height: 700px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero__bg {
	position: absolute;
	inset: -10% 0;
	background-image: url("../images/hero-background.jpg");
	background-image: image-set(
		url("../images/hero-background.avif") type("image/avif"),
		url("../images/hero-background.jpg") type("image/jpeg")
	);
	background-position: center;
	background-size: cover;
	background-color: rgba(0, 0, 0, 0.38);
	background-blend-mode: overlay;
	will-change: transform;
}

.hero__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	text-align: center;
	padding: 20px 30px;
}

.hero__logo {
	width: min(429px, 80vw);
}

.social-links {
	list-style: none;
	display: flex;
	gap: 0.75rem;
}

.social-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2em;
	height: 2em;
	font-size: 24px;
	border-radius: 50%;
	background: #f0f0f0;
	color: #444;
}

.social-links a:hover {
	text-decoration: none;
	opacity: 0.9;
}

.social-links svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.social-links .social-links--facebook {
	background: #0866ff;
	color: #fff;
}

.social-links .social-links--linkedin {
	background: #0d66c2;
	color: #fff;
}

.hero__phones {
	margin: 0;
	color: var(--color-text-on-dark);
	font-size: 1.05em;
}

.hero__phones a {
	color: inherit;
}

/* Section rhythm */

.section {
	padding: 3.5rem 0;
}

.section--alt {
	background: var(--color-bg-alt);
}

/* Intro (media + text) */

.intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 3.5rem 24px;
	gap: 2.5rem;
}

.intro__media img {
	width: 100%;
	border-radius: 4px;
}

.intro__content p:last-child {
	margin-bottom: 0;
}

@media (max-width: 700px) {
	.intro {
		grid-template-columns: 1fr;
	}
}

/* Services */

.services__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: center;
	gap: 2rem;
	margin-bottom: 2rem;
}

.services__list {
	list-style: none;
}

.services__list li {
	margin: 0.6em 0;
	line-height: 1.4;
}

.services__image {
	width: 100%;
	max-width: 280px;
	margin: 0 auto;
	border-radius: 4px;
}

@media (max-width: 900px) {
	.services__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 700px) {
	.services__grid {
		grid-template-columns: 1fr;
	}

	.services__image--hide-mobile {
		display: none;
	}
}

.services__cta {
	margin: 0;
}

/* About */

.about h3 {
	margin-bottom: 1em;
}

/* Contact */

.contact__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: center;
}

.contact__logo {
	width: 260px;
	max-width: 100%;
	margin: 0 0 2rem;
}

.contact__image {
	border-radius: 9999px;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.icon-list {
	list-style: none;
}

.icon-list li {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin: 0.9em 0;
}

.icon-list svg {
	flex: none;
	width: 1em;
	height: 1em;
	fill: var(--color-primary);
}

.icon-list a {
	display: flex;
	align-items: center;
	gap: 0.75em;
	color: var(--color-text);
}

.icon-list a:hover {
	color: var(--color-primary);
	text-decoration: none;
}

@media (max-width: 700px) {
	.contact__grid {
		grid-template-columns: 1fr;
	}
}

/* Poster */

.poster {
	max-width: 557px;
	margin: 0 auto;
	padding: 2rem 24px;
}

/* Funding */

.funding {
	padding: 2rem 0 3.5rem;
	text-align: center;
}

.funding__logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2.5rem;
	margin-bottom: 1.5rem;
}

.funding__logos img {
	width: auto;
	max-width: 260px;
	max-height: 90px;
}

.funding p {
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

/* Footer */

.site-footer {
	padding: 1.5rem 24px;
	text-align: center;
	font-size: 0.9em;
	color: #555;
	border-top: 1px solid var(--color-border);
}

/* Scroll reveal */

.reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal[data-reveal="fade-left"] {
	transform: translateX(-40px);
}

.reveal[data-reveal="fade-right"] {
	transform: translateX(40px);
}

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

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