/* ============================================================
   Adherence Digital — shared styles
   Base, navigation, and the section components used across
   case-study.html and audit.html. Page-specific styles stay
   in each page's own <style> block.
   ============================================================ */

:root {
	--primary: #FF4D00;
	--primary-dark: #CC3D00;
	--black: #0A0A0A;
	--white: #FAFAFA;
	--grey-dark: #1A1A1A;
	--grey-mid: #2A2A2A;
	--grey-light: #3A3A3A;
	--text-dim: #888888;

	--font-mono: 'JetBrains Mono', monospace;
	--font-display: 'Space Grotesk', sans-serif;

	--grid-gap: 2rem;
	--section-padding: 6rem;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-mono);
	background: var(--black);
	color: var(--white);
	line-height: 1.6;
	overflow-x: hidden;
}

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 2rem;
}

.container-narrow {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 2rem;
}

/* Grid Background */
.grid-bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
	background-image: linear-gradient(rgba(255,77,0,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 77, 0, 0.03) 1px, transparent 1px);
	background-size: 60px 60px;
}

/* Navigation */
nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	padding: 1.5rem 0;
	background: rgba(10, 10, 10, 0.95);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--grey-mid);
}

nav .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--white);
}

.logo-wordmark {
	position: relative;
	padding: 10px 16px;
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.logo-wordmark .bracket-tl,
.logo-wordmark .bracket-br {
	position: absolute;
	width: 12px;
	height: 12px;
	border-color: var(--primary);
	border-style: solid;
}

.logo-wordmark .bracket-tl {
	top: 0;
	left: 0;
	border-width: 2px 0 0 2px;
}

.logo-wordmark .bracket-br {
	bottom: 0;
	right: 0;
	border-width: 0 2px 2px 0;
}

.logo-adherence {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.15rem;
	color: var(--white);
	letter-spacing: -0.02em;
}

.logo-digital {
	font-family: 'Chakra Petch', sans-serif;
	font-weight: 600;
	font-size: 1.15rem;
	color: var(--primary);
	letter-spacing: 0.02em;
}

.nav-links {
	display: flex;
	gap: 2.5rem;
	list-style: none;
}

.nav-links a {
	color: var(--text-dim);
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 500;
	transition: color 0.3s ease;
	position: relative;
}

.nav-links a::before {
	content: '//';
	margin-right: 0.5rem;
	color: var(--primary);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.nav-links a:hover {
	color: var(--white);
}

.nav-links a:hover::before {
	opacity: 1;
}

.nav-links a.active {
	color: var(--white);
}

.nav-links a.active::before {
	opacity: 1;
}

.nav-cta {
	background: var(--primary);
	color: var(--black);
	padding: 0.75rem 1.5rem;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.85rem;
	transition: all 0.3s ease;
	clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.nav-cta:hover {
	background: var(--white);
	transform: translateY(-2px);
}

/* Section label */
.section-label {
	font-size: 0.75rem;
	color: var(--primary);
	text-transform: uppercase;
	letter-spacing: 0.2em;
	margin-bottom: 1rem;
}

/* Sub-page hero (case study, audit) */
.cs-hero {
	position: relative;
	z-index: 1;
	padding-top: 160px;
	padding-bottom: 4rem;
}

.cs-hero h1 {
	font-family: var(--font-display);
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.03em;
	margin-bottom: 2rem;
	max-width: 900px;
}

.cs-hero h1 .highlight {
	color: var(--primary);
}

.cs-hero .standfirst {
	font-size: 1.05rem;
	color: var(--text-dim);
	max-width: 640px;
	line-height: 1.8;
	margin-bottom: 3rem;
}

/* Facts strip */
.cs-facts {
	border-top: 1px solid var(--grey-mid);
	border-bottom: 1px solid var(--grey-mid);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

.cs-fact {
	padding: 1.5rem 1.5rem 1.5rem 0;
	border-right: 1px solid var(--grey-mid);
	margin-right: 1.5rem;
}

.cs-fact:last-child {
	border-right: none;
	margin-right: 0;
}

.cs-fact-label {
	font-size: 0.7rem;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 0.15em;
	margin-bottom: 0.5rem;
}

.cs-fact-value {
	font-size: 0.85rem;
	color: var(--white);
}

/* Sub-page sections */
.cs-section {
	position: relative;
	z-index: 1;
	padding: var(--section-padding) 0 0;
}

.cs-section:last-of-type {
	padding-bottom: var(--section-padding);
}

.cs-section-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 3rem;
	border-bottom: 1px solid var(--grey-mid);
	padding-bottom: 1.5rem;
}

.cs-section-title {
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.section-count {
	font-size: 3.5rem;
	font-weight: 700;
	color: var(--grey-mid);
	line-height: 1;
}

.cs-grid {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 4rem;
	align-items: start;
}

.big-number {
	position: sticky;
	top: 120px;
}

.big-number-value {
	font-family: var(--font-display);
	font-size: clamp(3.5rem, 7vw, 5.5rem);
	font-weight: 700;
	color: var(--primary);
	line-height: 1;
	letter-spacing: -0.03em;
}

.big-number-label {
	font-size: 0.8rem;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-top: 1rem;
	line-height: 1.7;
}

.cs-body p {
	color: var(--text-dim);
	margin-bottom: 1.5rem;
	line-height: 1.9;
	font-size: 0.95rem;
}

.cs-body p strong {
	color: var(--white);
	font-weight: 600;
}

/* Callout panel */
.cs-panel {
	background: var(--grey-dark);
	border: 1px solid var(--grey-mid);
	padding: 2rem;
	position: relative;
	margin: 2.5rem 0;
}

.cs-panel::before {
	content: attr(data-label);
	position: absolute;
	top: -12px;
	left: 20px;
	background: var(--grey-dark);
	padding: 0 1rem;
	font-size: 0.7rem;
	color: var(--primary);
	letter-spacing: 0.1em;
}

.cs-panel p {
	margin-bottom: 1rem;
}

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

/* Labelled grid panel */
.ops-panel {
	background: var(--grey-dark);
	border: 1px solid var(--grey-mid);
	position: relative;
	margin-top: 3rem;
}

.ops-panel::before {
	content: attr(data-label);
	position: absolute;
	top: -12px;
	left: 20px;
	background: var(--grey-dark);
	padding: 0 1rem;
	font-size: 0.7rem;
	color: var(--primary);
	letter-spacing: 0.1em;
	z-index: 2;
}

.ops-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: var(--grey-mid);
}

.ops-item {
	background: var(--grey-dark);
	padding: 1.5rem;
}

.ops-item-title {
	font-family: var(--font-display);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--white);
	margin-bottom: 0.5rem;
}

.ops-item-text {
	font-size: 0.78rem;
	color: var(--text-dim);
	line-height: 1.7;
}

/* Sub-page CTA */
.cs-cta {
	position: relative;
	z-index: 1;
	padding: var(--section-padding) 0;
}

.cs-cta-inner {
	border: 1px solid var(--grey-mid);
	background: var(--grey-dark);
	padding: 4rem 3rem;
	text-align: center;
}

.cs-cta h2 {
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin-bottom: 1.25rem;
}

.cs-cta p {
	color: var(--text-dim);
	max-width: 560px;
	margin: 0 auto 2.5rem;
	line-height: 1.8;
	font-size: 0.95rem;
}

.btn-primary {
	background: var(--primary);
	color: var(--black);
	padding: 1rem 2rem;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-primary:hover {
	background: var(--white);
	transform: translateY(-2px);
}

.btn-primary svg {
	transition: transform 0.3s ease;
}

.btn-primary:hover svg {
	transform: translateX(4px);
}

.cs-cta-email {
	display: block;
	margin-top: 1.5rem;
	font-size: 0.8rem;
	color: var(--text-dim);
}

.cs-cta-email a {
	color: var(--white);
	text-decoration: none;
	transition: color 0.3s ease;
}

.cs-cta-email a:hover {
	color: var(--primary);
}

/* Sub-page footer */
.footer-simple {
	padding: 3rem 0 2rem;
	border-top: 1px solid var(--grey-mid);
	position: relative;
	z-index: 1;
}

.footer-simple .footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.footer-simple .footer-copyright {
	font-size: 0.75rem;
	color: var(--text-dim);
}

.footer-simple .footer-links {
	display: flex;
	gap: 2rem;
}

.footer-simple .footer-links a {
	color: var(--text-dim);
	text-decoration: none;
	font-size: 0.75rem;
	transition: color 0.3s ease;
}

.footer-simple .footer-links a:hover {
	color: var(--white);
}

/* Animations */
.fade-in {
	opacity: 0;
	transform: translateY(30px);
	animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive */
@media(max-width: 1024px) {
	.cs-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.big-number {
		position: static;
		display: flex;
		align-items: baseline;
		gap: 1.5rem;
	}

	.big-number-label {
		margin-top: 0;
		max-width: 300px;
	}
}

@media(max-width: 768px) {
	:root {
		--section-padding: 4rem;
	}

	.nav-links {
		display: none;
	}

	.cs-facts {
		grid-template-columns: 1fr;
	}

	.cs-fact {
		border-right: none;
		margin-right: 0;
		padding: 1rem 0;
		border-bottom: 1px solid var(--grey-mid);
	}

	.cs-fact:last-child {
		border-bottom: none;
	}

	.ops-grid {
		grid-template-columns: 1fr;
	}

	.cs-cta-inner {
		padding: 3rem 1.5rem;
	}

	.footer-simple .footer-bottom {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}
}
