/* ============================================
   3ZETA.IO — REFINED DARK THEME
   Accessible, Semantic, Performant
   ============================================ */

/* CSS Variables */
:root {
	/* Colors */
	--color-bg: #0a0a0b;
	--color-bg-elevated: #111113;
	--color-text: #e8e6e3;
	--color-text-muted: #9a9690;
	--color-text-subtle: #6a6660;
	--color-accent: #c9a962;
	--color-accent-hover: #dfc07a;
	--color-border: #1f1f22;
	--color-border-light: #2a2a2e;
	--color-focus: #5b9dd9;
	--color-focus-outline: rgba(91, 157, 217, 0.5);

	/* Typography */
	--font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--font-sans:
		"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

	/* Spacing */
	--spacing-xs: 0.5rem;
	--spacing-sm: 1rem;
	--spacing-md: 2rem;
	--spacing-lg: 4rem;
	--spacing-xl: 8rem;
	--spacing-2xl: 12rem;

	/* Layout */
	--max-width: 1200px;
	--max-width-narrow: 800px;

	/* Focus */
	--focus-ring-width: 3px;
	--focus-ring-offset: 2px;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
	font-size: 100%; /* Respect user font size preferences */
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	font-family: var(--font-sans);
	font-weight: 400;
	line-height: 1.7;
	color: var(--color-text);
	background-color: var(--color-bg);
	overflow-x: hidden;
	min-height: 100vh;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	:root {
		--color-text: #ffffff;
		--color-text-muted: #cccccc;
		--color-border: #444444;
		--color-accent: #ffd700;
	}
}

::selection {
	background-color: var(--color-accent);
	color: var(--color-bg);
}

/* ============================================
   ACCESSIBILITY UTILITIES
   ============================================ */

/* Screen reader only - visually hidden but accessible */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Make sr-only focusable */
.sr-only-focusable:focus,
.sr-only-focusable:active {
	position: static;
	width: auto;
	height: auto;
	padding: inherit;
	margin: inherit;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
}

/* Skip Link */
.skip-link {
	position: absolute;
	top: -100%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 9999;
	padding: var(--spacing-sm) var(--spacing-md);
	background-color: var(--color-accent);
	color: var(--color-bg);
	font-weight: 600;
	font-size: 0.875rem;
	text-decoration: none;
	border-radius: 0 0 4px 4px;
	transition: top 0.2s ease;
}

.skip-link:focus {
	top: 0;
	outline: var(--focus-ring-width) solid var(--color-focus);
	outline-offset: var(--focus-ring-offset);
}

/* ============================================
   FOCUS STYLES
   ============================================ */

/* Remove default outline, add custom focus styles */
:focus {
	outline: none;
}

/* Visible focus for keyboard navigation */
:focus-visible {
	outline: var(--focus-ring-width) solid var(--color-focus);
	outline-offset: var(--focus-ring-offset);
}

/* Focus styles for interactive elements */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: var(--focus-ring-width) solid var(--color-focus);
	outline-offset: var(--focus-ring-offset);
	border-radius: 2px;
}

/* High visibility focus for buttons */
.btn:focus-visible {
	outline: var(--focus-ring-width) solid var(--color-focus);
	outline-offset: var(--focus-ring-offset);
	box-shadow: 0 0 0 6px var(--color-focus-outline);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-serif);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

h1 {
	font-size: clamp(3rem, 10vw, 7rem);
	font-weight: 300;
}

h2 {
	font-size: clamp(1.75rem, 5vw, 3rem);
	color: var(--color-text);
}

h3 {
	font-family: var(--font-serif);
	font-size: 1.75rem;
	color: var(--color-text);
	letter-spacing: 0;
	text-transform: none;
}

p {
	font-size: 1.125rem;
	color: var(--color-text-muted);
	max-width: 65ch;
}

.lead {
	font-size: 1.5rem;
	font-weight: 300;
	color: var(--color-text);
	font-family: var(--font-serif);
	font-style: italic;
}

/* Ensure proper text spacing */
p + p {
	margin-top: 1em;
}

/* ============================================
   LINKS
   ============================================ */

a {
	color: var(--color-accent);
	text-decoration: underline;
	text-underline-offset: 0.2em;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--color-accent-hover);
}

/* Remove underline for specific contexts */
.nav__links a,
.nav__logo,
.btn {
	text-decoration: none;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 var(--spacing-md);
}

.container--narrow {
	max-width: var(--max-width-narrow);
}

section {
	padding: var(--spacing-xl) 0;
	position: relative;
}

.section__header {
	margin-bottom: var(--spacing-md);
}

/* ============================================
   SECTION LABELS
   ============================================ */

.section-label {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--color-accent);
	margin-bottom: var(--spacing-sm);
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	padding: var(--spacing-md) 0;
	background: linear-gradient(to bottom, var(--color-bg) 0%, transparent 100%);
	transition: background 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
	.nav {
		transition: none;
	}
}

.nav.scrolled {
	background: rgba(10, 10, 11, 0.95);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--color-border);
}

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

.nav__logo {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--color-text);
	letter-spacing: 0.1em;
	padding: var(--spacing-xs);
	margin: calc(-1 * var(--spacing-xs));
}

.nav__logo span {
	color: var(--color-accent);
}

.nav__links {
	display: flex;
	gap: var(--spacing-md);
	list-style: none;
}

.nav__links a {
	display: inline-block;
	color: var(--color-text-muted);
	font-size: 0.875rem;
	letter-spacing: 0.05em;
	padding: var(--spacing-xs) var(--spacing-sm);
	margin: calc(-1 * var(--spacing-xs)) calc(-1 * var(--spacing-sm));
	border-radius: 4px;
	transition:
		color 0.2s ease,
		background-color 0.2s ease;
}

.nav__links a:hover {
	color: var(--color-text);
}

.nav__links a:focus-visible {
	background-color: var(--color-bg-elevated);
}

/* Mobile Navigation Toggle */
.nav__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	background: transparent;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.nav__toggle:hover {
	border-color: var(--color-border-light);
}

.nav__toggle-bar {
	display: block;
	width: 20px;
	height: 2px;
	background-color: var(--color-text);
	transition:
		transform 0.2s ease,
		opacity 0.2s ease;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
	opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.nav__mobile-menu {
	position: relative;
	display: none;
	flex-direction: column;
	gap: 0;
	list-style: none;
	padding-top: var(--spacing-md);
	border-top: 1px solid var(--color-border);
	margin-top: var(--spacing-md);
}

.nav__mobile-menu[aria-hidden="false"] {
	display: flex;
}

.nav__mobile-menu a {
	display: block;
	color: var(--color-text-muted);
	font-size: 1rem;
	padding: var(--spacing-sm) 0;
	border-bottom: 1px solid var(--color-border);
	transition: color 0.2s ease;
}

.nav__mobile-menu a:hover,
.nav__mobile-menu a:focus {
	color: var(--color-text);
}

.nav__mobile-menu li:last-child a {
	border-bottom: none;
}

.nav__mobile-menu::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: -1;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(12px);
}

/* ============================================
   HERO
   ============================================ */

.hero {
	min-height: 100vh;
	min-height: 100dvh; /* Dynamic viewport height for mobile */
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: var(--spacing-xl) var(--spacing-md);
	position: relative;
}

.hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(
		ellipse at 50% 0%,
		rgba(201, 169, 98, 0.03) 0%,
		transparent 50%
	);
	pointer-events: none;
}

.hero__brand {
	font-size: clamp(4rem, 15vw, 10rem);
	font-family: var(--font-serif);
	font-weight: 300;
	letter-spacing: 0.05em;
	margin-bottom: var(--spacing-sm);
	opacity: 0;
	animation: fadeInUp 1s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
	.hero__brand {
		opacity: 1;
		animation: none;
	}
}

.hero__brand span {
	color: var(--color-accent);
}

.hero__tagline {
	font-family: var(--font-mono);
	font-size: clamp(0.75rem, 2vw, 0.875rem);
	letter-spacing: 0.3em;
	color: var(--color-text-muted);
	text-transform: uppercase;
	margin-bottom: var(--spacing-lg);
	opacity: 0;
	animation: fadeInUp 1s ease 0.2s forwards;
	margin-left: auto;
	margin-right: auto;
}

@media (prefers-reduced-motion: reduce) {
	.hero__tagline {
		opacity: 1;
		animation: none;
	}
}

.hero__statement {
	font-family: var(--font-serif);
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	font-style: italic;
	color: var(--color-text);
	margin-bottom: var(--spacing-lg);
	max-width: none;
	opacity: 0;
	animation: fadeInUp 1s ease 0.4s forwards;
}

@media (prefers-reduced-motion: reduce) {
	.hero__statement {
		opacity: 1;
		animation: none;
	}
}

.hero__cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--spacing-md);
	opacity: 0;
	animation: fadeInUp 1s ease 0.6s forwards;
}

@media (prefers-reduced-motion: reduce) {
	.hero__cta {
		opacity: 1;
		animation: none;
	}
}

.hero__scroll {
	position: absolute;
	bottom: var(--spacing-lg);
	left: 50%;
	transform: translateX(-50%);
	opacity: 0;
	animation:
		fadeIn 1s ease 1s forwards,
		float 3s ease-in-out infinite 1.5s;
}

@media (prefers-reduced-motion: reduce) {
	.hero__scroll {
		opacity: 0.5;
		animation: none;
	}
}

.hero__scroll svg {
	width: 24px;
	height: 24px;
	stroke: var(--color-text-subtle);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--spacing-xs);
	padding: 0.875rem 2rem;
	min-height: 44px; /* Touch target size */
	min-width: 44px;
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border: 1px solid transparent;
	border-radius: 2px;
	cursor: pointer;
	transition: all 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
	.btn {
		transition: none;
	}
}

.btn--primary {
	background-color: var(--color-accent);
	color: var(--color-bg);
	border-color: var(--color-accent);
}

.btn--primary:hover {
	background-color: var(--color-accent-hover);
	border-color: var(--color-accent-hover);
}

.btn--secondary {
	background-color: transparent;
	color: var(--color-text);
	border-color: var(--color-border-light);
}

.btn--secondary:hover {
	border-color: var(--color-text);
	background-color: rgba(255, 255, 255, 0.03);
}

/* ============================================
   SECTION DIVIDER
   ============================================ */

.divider {
	width: 60px;
	height: 1px;
	background: linear-gradient(to right, var(--color-accent), transparent);
	margin: var(--spacing-md) 0;
}

/* ============================================
   PHILOSOPHY SECTION
   ============================================ */

.philosophy {
	background-color: var(--color-bg-elevated);
	border-top: 1px solid var(--color-border);
	border-bottom: 1px solid var(--color-border);
}

.philosophy__content {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--spacing-lg);
}

.philosophy__lead {
	font-family: var(--font-serif);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 300;
	line-height: 1.3;
	color: var(--color-text);
	max-width: none;
}

.philosophy__lead em {
	font-style: italic;
	color: var(--color-accent);
}

.philosophy__text {
	max-width: 600px;
}

.philosophy__text p {
	margin-bottom: var(--spacing-md);
}

.philosophy__emphasis {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	color: var(--color-text);
	font-style: italic;
	border-left: 2px solid var(--color-accent);
	padding-left: var(--spacing-md);
	margin-top: var(--spacing-lg);
	margin-bottom: 0;
}

.philosophy__emphasis p {
	font-size: inherit;
	color: inherit;
	font-style: inherit;
	margin: 0;
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--spacing-lg);
	margin-top: var(--spacing-lg);
	list-style: none;
}

.service-card {
	padding: var(--spacing-lg);
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.service-card {
		transition: none;
	}
}

.service-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background: linear-gradient(to right, var(--color-accent), transparent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
	.service-card::before {
		transition: none;
	}
}

.service-card:hover,
.service-card:focus-within {
	border-color: var(--color-border-light);
	transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
	.service-card:hover,
	.service-card:focus-within {
		transform: none;
	}
}

.service-card:hover::before,
.service-card:focus-within::before {
	transform: scaleX(1);
}

.service-card__number {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--color-text-subtle);
	margin-bottom: var(--spacing-sm);
}

.service-card__title {
	font-family: var(--font-serif);
	font-size: 1.75rem;
	color: var(--color-text);
	margin-bottom: var(--spacing-sm);
}

.service-card__desc {
	font-size: 1rem;
	color: var(--color-text-muted);
	line-height: 1.8;
}

/* ============================================
   FRAMEWORK SECTION
   ============================================ */

.framework {
	background-color: var(--color-bg-elevated);
	border-top: 1px solid var(--color-border);
	border-bottom: 1px solid var(--color-border);
}

.framework__principles {
	margin-top: var(--spacing-lg);
	list-style: none;
	counter-reset: principle;
}

.principle {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--spacing-md);
	padding: var(--spacing-md) 0;
	border-bottom: 1px solid var(--color-border);
	align-items: baseline;
}

.principle:last-child {
	border-bottom: none;
}

.principle__number {
	font-family: var(--font-mono);
	font-size: 0.875rem;
	color: var(--color-accent);
	min-width: 40px;
}

.principle__text {
	font-family: var(--font-serif);
	font-size: 1.5rem;
	color: var(--color-text);
}

.framework__coda {
	margin-top: var(--spacing-lg);
	padding-top: var(--spacing-lg);
}

.framework__coda p {
	font-family: var(--font-serif);
	font-size: 1.125rem;
	color: var(--color-text-muted);
	font-style: italic;
}

.framework__coda p:last-child {
	color: var(--color-text);
	font-style: normal;
}

.framework__coda strong {
	font-weight: 400;
}

/* ============================================
   WHY ZETA SECTION
   ============================================ */

.why-zeta__content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--spacing-xl);
	align-items: start;
}

.why-zeta__explanation p {
	margin-bottom: var(--spacing-md);
}

.why-zeta__principles {
	padding: var(--spacing-lg);
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	list-style: none;
}

.why-zeta__principles li {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	color: var(--color-text);
	margin-bottom: var(--spacing-sm);
	padding-left: var(--spacing-md);
	position: relative;
}

.why-zeta__principles li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 4px;
	height: 4px;
	background: var(--color-accent);
	border-radius: 50%;
}

.why-zeta__principles li:last-child {
	margin-bottom: 0;
}

/* ============================================
   CLOSING SECTION
   ============================================ */

.closing {
	text-align: center;
	padding: var(--spacing-2xl) 0;
}

.closing__statement {
	font-family: var(--font-serif);
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	font-style: italic;
	color: var(--color-text-muted);
	margin-bottom: var(--spacing-md);
	max-width: none;
}

.closing__statement em {
	color: var(--color-accent);
	font-style: normal;
}

.closing__brand {
	font-family: var(--font-serif);
	font-size: clamp(1.5rem, 4vw, 2.5rem);
	color: var(--color-text);
	margin-top: var(--spacing-lg);
	max-width: none;
}

.closing__cta {
	display: flex;
	justify-content: center;
	margin-top: var(--spacing-lg);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
	padding: var(--spacing-lg) 0;
	border-top: 1px solid var(--color-border);
}

.footer__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--spacing-md);
}

.footer__text {
	font-size: 0.875rem;
	color: var(--color-text-subtle);
}

.footer__text small {
	font-size: inherit;
}

.footer__links {
	display: flex;
	gap: var(--spacing-md);
	font-style: normal;
}

.footer__links a {
	font-size: 0.875rem;
	color: var(--color-text-muted);
	transition: color 0.2s ease;
}

.footer__links a:hover {
	color: var(--color-text);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes float {
	0%,
	100% {
		transform: translateX(-50%) translateY(0);
	}
	50% {
		transform: translateX(-50%) translateY(-10px);
	}
}

/* Fade in on scroll */
.fade-in {
	opacity: 0;
	transform: translateY(40px);
	transition:
		opacity 0.6s ease,
		transform 0.6s ease;
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
	section {
		padding: var(--spacing-lg) 0;
	}

	.nav__links {
		display: none;
	}

	.nav__toggle {
		display: flex;
	}

	.hero__cta {
		flex-direction: column;
		align-items: center;
		width: 100%;
		max-width: 300px;
		margin-left: auto;
		margin-right: auto;
	}

	.btn {
		width: 100%;
	}

	.why-zeta__content {
		grid-template-columns: 1fr;
		gap: var(--spacing-lg);
	}

	.footer__inner {
		flex-direction: column;
		text-align: center;
	}

	.principle {
		grid-template-columns: 1fr;
		gap: var(--spacing-xs);
	}

	.principle__number {
		min-width: auto;
	}
}

@media (max-width: 480px) {
	:root {
		--spacing-lg: 3rem;
		--spacing-xl: 5rem;
	}

	.service-card {
		padding: var(--spacing-md);
	}

	.closing {
		padding: var(--spacing-xl) 0;
	}
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
	*,
	*::before,
	*::after {
		background: transparent !important;
		color: #000 !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	a,
	a:visited {
		text-decoration: underline;
	}

	a[href]::after {
		content: " (" attr(href) ")";
	}

	.nav,
	.hero__scroll,
	.skip-link {
		display: none !important;
	}

	.hero {
		min-height: auto;
		padding: 2rem 0;
	}

	section {
		page-break-inside: avoid;
	}
}
