/* ===================================
   ABC Partners — View-based SPA
   Dieter Rams: Less, but better.
   One screen, one purpose.
   =================================== */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
	--font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
	--nav-h: 56px;
}

/* Dark theme (default) — ABC Partners brand blue #3095D3 */
[data-theme="dark"] {
	--bg: #0a0e14;
	--bg-elevated: #0f1620;
	--bg-hover: #14202d;
	--text: #e8edf3;
	--text-secondary: #8899aa;
	--text-muted: #4f6478;
	--accent: #3095D3;
	--accent-bright: #44a8e6;
	--accent-muted: rgba(48,149,211,0.12);
	--accent-glow: rgba(48,149,211,0.06);
	--border: #1a2736;
	--border-accent: rgba(48,149,211,0.25);
	--nav-bg: rgba(10,14,20,0.92);
	--logo-invert: invert(0.7);
	--logo-invert-hover: invert(0.9);
}

/* Light theme */
[data-theme="light"] {
	--bg: #ffffff;
	--bg-elevated: #f2f6fa;
	--bg-hover: #e6edf4;
	--text: #0a0e14;
	--text-secondary: #4a5d72;
	--text-muted: #8a9ab0;
	--accent: #2884bf;
	--accent-bright: #3095D3;
	--accent-muted: rgba(48,149,211,0.07);
	--accent-glow: rgba(48,149,211,0.03);
	--border: #dce4ec;
	--border-accent: rgba(48,149,211,0.3);
	--nav-bg: rgba(255,255,255,0.92);
	--logo-invert: invert(0);
	--logo-invert-hover: invert(0);
}

html {
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	letter-spacing: -0.01em;
	overflow: hidden;
	height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }

.container {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
}


/* =========================
   Nav
   ========================= */
.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: var(--nav-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
}

.nav-inner {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
	height: var(--nav-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nav-logo { cursor: pointer; }
.nav-logo img { opacity: 0.92; transition: opacity 0.3s; }
.nav-logo:hover img { opacity: 1; }

/* Logo switching */
.nav-logo-dark { display: block; }
.nav-logo-light { display: none; }
[data-theme="light"] .nav-logo-dark { display: none; }
[data-theme="light"] .nav-logo-light { display: block; }

/* Nav links */
.nav-links {
	display: flex;
	gap: 32px;
}

.nav-link {
	font-size: 13px;
	font-weight: 400;
	color: var(--text-secondary);
	letter-spacing: 0.02em;
	transition: color 0.2s;
	padding-bottom: 2px;
	border-bottom: 1.5px solid transparent;
}

.nav-link:hover { color: var(--text); }
.nav-link.active {
	color: var(--accent);
	border-bottom-color: var(--accent);
}

/* Theme toggle */
.theme-toggle {
	background: none;
	border: 1px solid var(--border);
	border-radius: 50%;
	width: 32px;
	height: 32px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-secondary);
	transition: all 0.2s;
	flex-shrink: 0;
}

.theme-toggle:hover {
	color: var(--accent);
	border-color: var(--accent);
}

.theme-toggle svg { width: 16px; height: 16px; }

.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }
[data-theme="light"] .theme-icon-sun { display: block; }
[data-theme="light"] .theme-icon-moon { display: none; }

/* Mobile toggle */
.nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	width: 24px;
	height: 24px;
	position: relative;
}

.nav-toggle span {
	display: block;
	width: 18px;
	height: 1.5px;
	background: var(--text-secondary);
	position: absolute;
	left: 3px;
	transition: all 0.3s;
}

.nav-toggle span:first-child { top: 8px; }
.nav-toggle span:last-child { top: 14px; }

.nav-toggle.active span:first-child {
	transform: rotate(45deg);
	top: 11px;
}

.nav-toggle.active span:last-child {
	transform: rotate(-45deg);
	top: 11px;
}

/* Mobile menu */
.mobile-menu {
	display: none;
	position: fixed;
	top: var(--nav-h);
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--bg);
	z-index: 99;
	padding: 48px 24px;
	flex-direction: column;
	gap: 24px;
}

.mobile-menu.active { display: flex; }

.mobile-menu a {
	font-size: 24px;
	font-weight: 300;
	color: var(--text-secondary);
	transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--text); }
.mobile-menu a.active { color: var(--accent); }


/* =========================
   Views — SPA structure
   ========================= */
.view {
	position: fixed;
	top: var(--nav-h);
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s;
	overflow-y: auto;
}

.view.active {
	opacity: 1;
	visibility: visible;
}


/* =========================
   Hero View
   ========================= */
.view-hero {
	position: fixed;
	justify-content: center;
	overflow: hidden;
}

.hero-content {
	position: relative;
	z-index: 2;
}

.hero-line {
	width: 48px;
	height: 3px;
	background: var(--accent);
	margin-bottom: 32px;
	border-radius: 2px;
}

.view-hero h1 {
	font-size: clamp(36px, 6vw, 64px);
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: -0.03em;
	margin-bottom: 24px;
}

.view-hero h1 .accent { color: var(--accent); }

.hero-sub {
	font-size: clamp(16px, 2vw, 20px);
	font-weight: 300;
	color: var(--text-secondary);
	max-width: 520px;
	line-height: 1.5;
}

/* Concentric squares animation */
.hero-anim {
	position: absolute;
	right: 10%;
	top: 50%;
	transform: translateY(-50%);
	width: 520px;
	height: 520px;
	z-index: 1;
}

.sq {
	position: absolute;
	top: 50%;
	left: 50%;
	border: 1.5px solid var(--accent);
	border-radius: 2px;
}

.sq-1 {
	width: 420px; height: 420px;
	margin: -210px 0 0 -210px;
	opacity: 0.10;
	animation: spin-cw 60s linear infinite;
}

.sq-2 {
	width: 320px; height: 320px;
	margin: -160px 0 0 -160px;
	opacity: 0.15;
	animation: spin-ccw 45s linear infinite;
}

.sq-3 {
	width: 220px; height: 220px;
	margin: -110px 0 0 -110px;
	opacity: 0.22;
	animation: spin-cw 30s linear infinite;
}

.sq-4 {
	width: 140px; height: 140px;
	margin: -70px 0 0 -70px;
	opacity: 0.30;
	animation: spin-ccw 20s linear infinite;
}

.sq-5 {
	width: 72px; height: 72px;
	margin: -36px 0 0 -36px;
	opacity: 0.40;
	background: var(--accent);
	border: none;
	animation: spin-cw 15s linear infinite, pulse 4s ease-in-out infinite;
	box-shadow: 0 0 40px rgba(48,149,211,0.3);
}

@keyframes spin-cw { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }
@keyframes pulse {
	0%, 100% { opacity: 0.20; }
	50% { opacity: 0.40; }
}


/* =========================
   About & Portfolio Views
   ========================= */
.view-body {
	flex: 1;
	padding-top: 64px;
	padding-bottom: 48px;
}

.view-header {
	margin-bottom: 48px;
}

.view-title {
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 300;
	letter-spacing: -0.02em;
}

/* Sub label (e.g. "Approach") */
.sub-label {
	font-size: 11px;
	font-weight: 600;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 16px;
}

/* Text styles */
.text-lg {
	font-size: 20px;
	color: var(--text);
	font-weight: 300;
	line-height: 1.5;
	margin-bottom: 16px;
}

.text-body {
	color: var(--text-secondary);
	font-weight: 300;
	line-height: 1.7;
	margin-bottom: 20px;
}

.text-body:last-child { margin-bottom: 0; }

/* About blocks */
.about-block {
	margin-bottom: 56px;
	padding-bottom: 56px;
	border-bottom: 1px solid var(--border);
}

.approach-block {}


/* =========================
   Focus Areas
   ========================= */
.focus-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: var(--border);
	margin-top: 24px;
	border: 1px solid var(--border);
}

.focus-item {
	background: var(--bg);
	padding: 28px 24px;
	transition: all 0.25s;
	border-left: 2px solid transparent;
}

.focus-item:hover {
	background: var(--accent-muted);
	border-left-color: var(--accent);
}

.focus-title {
	font-size: 15px;
	font-weight: 500;
	margin-bottom: 6px;
}

.focus-item:hover .focus-title { color: var(--accent-bright); }

.focus-desc {
	font-size: 13px;
	color: var(--text-muted);
	font-weight: 300;
}


/* =========================
   Portfolio
   ========================= */
.portfolio-intro {
	margin-bottom: 32px;
}

.portfolio-featured {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: var(--border);
	border: 1px solid var(--border);
}

.pf-card {
	background: var(--bg);
	padding: 32px 28px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 180px;
	transition: all 0.25s;
	border-bottom: 2px solid transparent;
}

.pf-card:hover {
	background: var(--accent-muted);
	border-bottom-color: var(--accent);
}

.pf-logo {
	width: 100%;
	height: 48px;
	display: flex;
	align-items: center;
}

.pf-logo img {
	max-height: 36px;
	max-width: 120px;
	object-fit: contain;
	filter: brightness(0) var(--logo-invert);
	transition: filter 0.2s;
}

.pf-card:hover .pf-logo img { filter: brightness(0) var(--logo-invert-hover); }

.pf-info {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-top: auto;
}

.pf-name {
	font-size: 15px;
	font-weight: 500;
}

.pf-tag {
	font-size: 11px;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.7;
}

.pf-card:hover .pf-tag { opacity: 1; }

/* All Investments */
.portfolio-all { margin-top: 48px; }

.pf-divider {
	height: 1px;
	background: var(--border);
	margin-bottom: 24px;
}

.pf-section-title {
	font-size: 11px;
	font-weight: 600;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 20px;
}

.pf-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
}

.pf-item {
	font-size: 14px;
	font-weight: 400;
	color: var(--text-secondary);
	padding: 12px 0;
	border-bottom: 1px solid var(--border);
	transition: color 0.2s;
}

.pf-item:hover { color: var(--accent); }


/* =========================
   View Footer
   ========================= */
.view-footer {
	padding: 24px 0;
	border-top: 1px solid var(--border);
	margin-top: auto;
	flex-shrink: 0;
}

.footer-inner {
	display: flex;
	align-items: center;
	justify-content: center;
}

.footer-copy {
	font-size: 12px;
	color: var(--text-muted);
	text-align: center;
}


/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
	.nav-links { display: none; }
	.nav-toggle { display: block; }

	.hero-anim {
		width: 300px;
		height: 300px;
		right: -10%;
		top: 40%;
	}

	.sq-1 { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
	.sq-2 { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
	.sq-3 { width: 140px; height: 140px; margin: -70px 0 0 -70px; }
	.sq-4 { width: 90px; height: 90px; margin: -45px 0 0 -45px; }
	.sq-5 { width: 48px; height: 48px; margin: -24px 0 0 -24px; }

	.view-body { padding-top: 40px; }

	.focus-grid { grid-template-columns: 1fr; }

	.portfolio-featured { grid-template-columns: 1fr; }

	.pf-card { min-height: 120px; }

	.pf-grid { grid-template-columns: repeat(2, 1fr); }

	.footer-inner {
		flex-direction: column;
		gap: 12px;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.view-hero h1 { font-size: 32px; }

	.pf-grid { grid-template-columns: 1fr; }
}
