/* ---------- RESET & GLOBAL ---------- */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* Dark-first color system (default) */
:root {
	--bg-primary: #0A0C10;
	--bg-surface: #14161C;
	--bg-elevated: #1A1D25;
	--bg-glass: rgba(20, 22, 28, 0.72);
	--border-subtle: #2C2F38;
	--text-primary: #F1F3F9;
	--text-secondary: #9BA1B0;
	--text-muted: #6C7280;
	--accent: #3B82F6;
	--accent-hover: #5A9CFF;
	--accent-soft: rgba(59,130,246,0.12);
	--shadow-sm: 0 8px 20px rgba(0,0,0,0.3);
	--shadow-md: 0 12px 28px rgba(0,0,0,0.35);
	--transition-fast: 0.2s ease;
	--transition-smooth: 0.25s cubic-bezier(0.2,0.9,0.4,1.1);
	--header-height: 80px;
}

/* Light theme overrides */
body.light {
	--bg-primary: #F8FAFF;
	--bg-surface: #FFFFFF;
	--bg-elevated: #F0F2F8;
	--bg-glass: rgba(255,255,255,0.85);
	--border-subtle: #E2E6ED;
	--text-primary: #111827;
	--text-secondary: #4B5563;
	--text-muted: #6B7280;
	--accent: #2563EB;
	--accent-hover: #1D4ED8;
	--accent-soft: rgba(37,99,235,0.08);
	--shadow-sm: 0 8px 20px rgba(0,0,0,0.05);
	--shadow-md: 0 12px 28px rgba(0,0,0,0.08);
}

body {
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	background-color: var(--bg-primary);
	color: var(--text-primary);
	line-height: 1.5;
	scroll-behavior: smooth;
	transition: background-color 0.2s, color 0.2s;
}

.container {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 32px;
}

/* ---------- STICKY HEADER with glassmorphism ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: transparent;
	transition: all var(--transition-smooth);
	backdrop-filter: blur(0px);
	border-bottom: 1px solid transparent;
}

.site-header.sticky {
	background-color: var(--bg-glass);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-subtle);
	box-shadow: var(--shadow-sm);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-height);
	gap: 24px;
}

/* left branding */
.logo-area {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
	text-decoration: none;
}
.logo-icon {
	font-size: 28px;
	color: var(--accent);
}
.logo-text {
	font-weight: 700;
	font-size: 1.65rem;
	letter-spacing: -0.3px;
	background: linear-gradient(135deg, #FFFFFF 0%, #94A3F8 100%);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
}
body.light .logo-text {
	background: linear-gradient(135deg, #1E293B 0%, #2563EB 100%);
	background-clip: text;
	-webkit-background-clip: text;
}
.tagline {
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--text-secondary);
	border-left: 1px solid var(--border-subtle);
	padding-left: 12px;
	display: none;
}
@media (min-width: 768px) {
	.tagline { display: inline-block; }
}

/* desktop navigation */
.nav-desktop {
	display: none;
}
@media (min-width: 1024px) {
	.nav-desktop { display: flex; flex: 1; justify-content: center; }
}
.nav-list {
	display: flex;
	gap: 6px;
	list-style: none;
}
.nav-item {
	position: relative;
}
.nav-link {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	font-weight: 500;
	font-size: 0.95rem;
	color: var(--text-secondary);
	border-radius: 40px;
	transition: all var(--transition-fast);
	cursor: pointer;
	text-decoration: none;
}
.nav-link i {
	font-size: 0.8rem;
	transition: transform 0.2s;
}
.nav-item:hover .nav-link {
	color: var(--accent);
	background-color: var(--accent-soft);
}

/* Mega menu container */
.mega-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	width: 680px;
	background: var(--bg-elevated);
	border-radius: 24px;
	padding: 24px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
	gap: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s, visibility 0.25s, transform 0.2s;
	transform: translateY(-8px);
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border-subtle);
	z-index: 1100;
	pointer-events: none;
}
.nav-item:last-child .mega-menu,
.nav-item:nth-child(8) .mega-menu {
	left: auto;
	right: 0;
}
.nav-item:hover .mega-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}
.mega-column h4 {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--accent);
	margin-bottom: 16px;
	font-weight: 600;
}
.mega-column ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.mega-column a {
	text-decoration: none;
	color: var(--text-secondary);
	font-size: 0.9rem;
	transition: color 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.mega-column a:hover {
	color: var(--accent);
}

/* right header actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}
.icon-btn {
	background: var(--bg-surface);
	border: 1px solid var(--border-subtle);
	border-radius: 40px;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--text-secondary);
	transition: all 0.2s;
}
.icon-btn:hover {
	background: var(--accent-soft);
	color: var(--accent);
	border-color: var(--accent);
}
.cta-btn {
	background: var(--accent);
	border: none;
	padding: 0 20px;
	height: 42px;
	border-radius: 40px;
	font-weight: 600;
	color: white;
	cursor: pointer;
	transition: background 0.2s;
	display: none;
	text-decoration: none;
}
@media (min-width: 640px) {
	.cta-btn { display: inline-flex; align-items: center; gap: 6px; }
}
.cta-btn:hover {
	background: var(--accent-hover);
	color: #fff;
}

/* mobile menu burger */
.mobile-toggle {
	background: transparent;
	border: none;
	font-size: 28px;
	color: var(--text-primary);
	cursor: pointer;
	display: flex;
}
@media (min-width: 1024px) {
	.mobile-toggle { display: none; }
}

/* Mobile slide-in panel */
.mobile-menu-panel {
	position: fixed;
	top: 0;
	left: -100%;
	width: 85%;
	max-width: 380px;
	height: 100vh;
	background: var(--bg-surface);
	z-index: 2000;
	padding: 24px 20px;
	transition: left 0.3s ease;
	display: flex;
	flex-direction: column;
	gap: 28px;
	box-shadow: 0 0 40px rgba(0,0,0,0.4);
	overflow-y: auto;
	border-right: 1px solid var(--border-subtle);
}
.mobile-menu-panel.open {
	left: 0;
}
.mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.5);
	backdrop-filter: blur(3px);
	z-index: 1999;
	visibility: hidden;
	opacity: 0;
	transition: 0.2s;
}
.mobile-overlay.active {
	visibility: visible;
	opacity: 1;
}
.mobile-nav-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.mobile-nav-item {
	border-bottom: 1px solid var(--border-subtle);
	padding: 8px 0;
}
.mobile-nav-link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 500;
	color: var(--text-primary);
	text-decoration: none;
	font-size: 1.1rem;
}
.mobile-submenu {
	padding-left: 20px;
	margin-top: 12px;
	display: none;
	flex-direction: column;
	gap: 12px;
}
.mobile-submenu.open {
	display: flex;
}
.mobile-submenu a {
	color: var(--text-secondary);
	text-decoration: none;
	font-size: 0.9rem;
}

/* search modal */
.search-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.8);
	backdrop-filter: blur(12px);
	z-index: 3000;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	transition: 0.2s;
}
.search-modal.active {
	visibility: visible;
	opacity: 1;
}
.search-container {
	background: var(--bg-elevated);
	width: 90%;
	max-width: 720px;
	border-radius: 48px;
	padding: 20px 24px;
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border-subtle);
}
.search-input-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
	border-bottom: 2px solid var(--border-subtle);
	padding-bottom: 12px;
}
.search-input-wrapper i {
	font-size: 24px;
	color: var(--text-muted);
}
#searchQuery {
	flex: 1;
	background: transparent;
	border: none;
	font-size: 1.4rem;
	font-weight: 500;
	outline: none;
	color: var(--text-primary);
}
.search-results {
	margin-top: 24px;
	max-height: 400px;
	overflow-y: auto;
}
.result-group h4 {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 16px 0 8px;
	color: var(--accent);
}
.result-item {
	display: flex;
	justify-content: space-between;
	padding: 12px 8px;
	border-radius: 12px;
	transition: background 0.1s;
}
.result-item:hover {
	background: var(--accent-soft);
}
.tool-cat {
	font-size: 0.7rem;
	background: var(--bg-primary);
	padding: 2px 8px;
	border-radius: 30px;
}

/* FOOTER design */
.site-footer {
	background: var(--bg-surface);
	border-top: 1px solid var(--border-subtle);
	margin-top: 80px;
	padding: 64px 0 32px;
}
.footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 48px 32px;
	margin-bottom: 48px;
}
.footer-col p {
	color: var(--text-secondary);
	font-size: 0.85rem;
	margin: 12px 0;
}
.social-icons {
	display: flex;
	gap: 16px;
	margin-top: 12px;
}
.social-icons a {
	color: var(--text-muted);
	font-size: 1.3rem;
	transition: color 0.2s;
}
.social-icons a:hover {
	color: var(--accent);
}
.footer-col h4 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 20px;
	letter-spacing: -0.2px;
}
.footer-links {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.footer-links a {
	text-decoration: none;
	color: var(--text-secondary);
	font-size: 0.85rem;
	transition: color 0.2s;
}
.footer-links a:hover {
	color: var(--accent);
}
.bottom-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	padding-top: 24px;
	border-top: 1px solid var(--border-subtle);
	gap: 16px;
}
.copyright {
	font-size: 0.75rem;
	color: var(--text-muted);
}
.bottom-actions {
	display: flex;
	gap: 20px;
	align-items: center;
}
.lang-select {
	background: var(--bg-primary);
	border: 1px solid var(--border-subtle);
	padding: 6px 12px;
	border-radius: 30px;
	color: var(--text-primary);
	font-size: 0.8rem;
	cursor: pointer;
}

/* responsive & utilities */
@media (max-width: 768px) {
	.container {
		padding: 0 20px;
	}

	.footer-grid {
		gap: 32px;
	}
}

.focus-visible:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

button,
a,
[role="button"] {
	cursor: pointer;
	transition: all 0.2s;
}