/* ============================================================
   Precision Tile Co. — v2 stylesheet
   Design tokens live in :root. Change them in one place.
   ============================================================ */

:root {
	/* Color palette — pulled from the logo */
	--color-brand: #1e4d8c;
	--color-brand-light: #6fa8dc;
	--color-text: #1a1a1a;
	--color-muted: #666;
	--color-bg: #ffffff;
	--color-bg-alt: #f5f7fa;
	--color-border: #e2e8ee;

	/* Typography */
	--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	/* Spacing & layout */
	--container-max: 1100px;
	--space-xs: 0.5rem;
	--space-sm: 1rem;
	--space-md: 2rem;
	--space-lg: 4rem;
	--space-xl: 6rem;

	--radius: 4px;
}

/* ------------------------------------------------------------
   Base
   ------------------------------------------------------------ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 var(--space-sm);
	color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space-md); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-sm); }

a { color: var(--color-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.button {
	display: inline-block;
	background: var(--color-brand);
	color: #fff;
	padding: 0.75rem 1.5rem;
	border-radius: var(--radius);
	font-weight: 600;
	transition: background 0.15s ease;
}
.button:hover {
	background: #163d70;
	text-decoration: none;
}

/* ------------------------------------------------------------
   Header / nav
   ------------------------------------------------------------ */
.site-header {
	border-bottom: 1px solid var(--color-border);
	background: var(--color-bg);
	position: sticky;
	top: 0;
	z-index: 10;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-xs);
}

.logo img { height: 64px; width: auto; }

.site-nav { display: flex; gap: var(--space-md); }
.site-nav a {
	color: var(--color-text);
	font-weight: 500;
}
.site-nav a:hover { color: var(--color-brand); text-decoration: none; }

.nav-toggle {
	display: none;
	background: none;
	border: 0;
	padding: 0.5rem;
	cursor: pointer;
}
.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-text);
	margin: 5px 0;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------
   Hero — split layout (text left, image right)
   ------------------------------------------------------------ */
.hero {
	padding: var(--space-xl) 0;
	background: var(--color-bg-alt);
}
.hero-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-lg);
	align-items: center;
}
.hero-copy .eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--color-brand);
	margin-bottom: var(--space-sm);
}
.hero-copy h1 { margin-bottom: var(--space-sm); }
.hero-copy .lede {
	font-size: 1.1rem;
	color: var(--color-muted);
	margin-bottom: var(--space-md);
}
.hero-image {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.hero-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 1s ease;
}
.hero-image img.is-active { opacity: 1; }

@media (max-width: 800px) {
	.hero-inner { grid-template-columns: 1fr; gap: var(--space-md); }
	.hero-image { aspect-ratio: 16 / 10; }
}

/* ------------------------------------------------------------
   Section defaults
   ------------------------------------------------------------ */
section { padding: var(--space-xl) 0; }
section h2 { text-align: center; }
.section-intro {
	text-align: center;
	color: var(--color-muted);
	margin-bottom: var(--space-md);
}

/* ------------------------------------------------------------
   Services
   ------------------------------------------------------------ */
.service-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--space-md);
}

.service {
	padding: var(--space-md);
	background: var(--color-bg-alt);
	border-radius: var(--radius);
	text-align: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.service:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

/* ------------------------------------------------------------
   Projects / gallery
   ------------------------------------------------------------ */
.projects { background: var(--color-bg-alt); }

.filter-bar {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--space-xs);
	margin-bottom: var(--space-md);
}
.filter-btn {
	font: inherit;
	color: var(--color-muted);
	background: transparent;
	border: 1px solid var(--color-border);
	padding: 0.5rem 1rem;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.15s ease;
}
.filter-btn:hover { color: var(--color-brand); border-color: var(--color-brand); }
.filter-btn.is-active {
	background: var(--color-brand);
	border-color: var(--color-brand);
	color: #fff;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--space-sm);
}
.gallery-item {
	display: block;
	overflow: hidden;
	border-radius: var(--radius);
	aspect-ratio: 1 / 1;
	background: #ddd;
	cursor: zoom-in;
}
.gallery-item[hidden] { display: none; }
.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* ------------------------------------------------------------
   About
   ------------------------------------------------------------ */
.about p { max-width: 720px; margin: 0 auto var(--space-md); text-align: center; }
.credentials {
	list-style: none;
	padding: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--space-md);
	color: var(--color-muted);
}

/* ------------------------------------------------------------
   Contact
   ------------------------------------------------------------ */
.contact { text-align: center; background: var(--color-bg-alt); }
.contact-info {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--space-md);
	margin-top: var(--space-md);
	margin-bottom: var(--space-md);
	font-size: 1.1rem;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
	padding: var(--space-md) 0;
	border-top: 1px solid var(--color-border);
	text-align: center;
	color: var(--color-muted);
	font-size: 0.9rem;
}

/* ------------------------------------------------------------
   Mobile adjustments
   ------------------------------------------------------------ */
@media (max-width: 640px) {
	.logo img { height: 48px; }
	section { padding: var(--space-lg) 0; }
	.hero { padding: var(--space-lg) 0; }

	.nav-toggle { display: block; }
	.site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		background: var(--color-bg);
		border-bottom: 1px solid var(--color-border);
		padding: var(--space-sm);
		gap: var(--space-sm);
	}
	.site-nav.is-open { display: flex; }
}
