/* ============================================
   ITčko — Base CSS
   Reset, variables, layout, header, footer, nav
   Aesthetic: "Quiet Authority" (dark v2)
   ============================================ */

/* ---- Self-hosted Fonts ---- */

/* Bricolage Grotesque — variable, weight 400–800 */
@font-face {
	font-family: 'Bricolage Grotesque';
	src: url('/assets/fonts/bricolage-grotesque-400-latin-ext.woff2') format('woff2');
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD, U+02E0-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Bricolage Grotesque';
	src: url('/assets/fonts/bricolage-grotesque-400.woff2') format('woff2');
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Urbanist — variable, weight 300–700 */
@font-face {
	font-family: 'Urbanist';
	src: url('/assets/fonts/urbanist-300-latin-ext.woff2') format('woff2');
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD, U+02E0-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Urbanist';
	src: url('/assets/fonts/urbanist-300.woff2') format('woff2');
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fira Code — variable, weight 400–500 */
@font-face {
	font-family: 'Fira Code';
	src: url('/assets/fonts/fira-code-400-latin-ext.woff2') format('woff2');
	font-weight: 400 500;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD, U+02E0-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Fira Code';
	src: url('/assets/fonts/fira-code-400.woff2') format('woff2');
	font-weight: 400 500;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Design Tokens ---- */

:root {
	--blue: #2563eb;
	--blue-soft: #60a5fa;
	--blue-dim: rgba(37, 99, 235, 0.12);
	--amber: #f59e0b;
	--amber-soft: #fbbf24;
	--amber-dim: rgba(245, 158, 11, 0.1);
	--teal: #14b8a6;
	--teal-soft: #5eead4;
	--teal-dim: rgba(20, 184, 166, 0.1);
	--red: #ef4444;
	--red-soft: #f87171;
	--red-dim: rgba(239, 68, 68, 0.1);

	--bg-deep: #08111c;
	--bg: #0c1829;
	--bg-raised: #111f36;
	--bg-card: #13243e;
	--bg-card-hover: #172a48;
	--bg-glass: rgba(19, 36, 62, 0.6);

	--text-primary: #edf2f7;
	--text-secondary: #94a8c4;
	--text-muted: #5a7394;
	--text-faint: #3d5573;

	--border: rgba(94, 128, 170, 0.1);
	--border-hover: rgba(94, 128, 170, 0.18);
	--border-accent: rgba(37, 99, 235, 0.25);

	--radius-sm: 8px;
	--radius-md: 14px;
	--radius-lg: 20px;

	--font-display: 'Bricolage Grotesque', sans-serif;
	--font-body: 'Urbanist', sans-serif;
	--font-mono: 'Fira Code', monospace;

	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset ---- */

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

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.65;
	color: var(--text-primary);
	background: var(--bg-deep);
	overflow-x: hidden;
}

/* ---- Subtle grain overlay ---- */

body::after {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
	opacity: 0.022;
	background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	background-size: 128px 128px;
}

/* ---- Layout ---- */

.container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}

.container--narrow {
	max-width: 780px;
}

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: var(--text-primary);
}

h1 {
	font-size: clamp(2.8rem, 5.8vw, 4.6rem);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1.06;
}

h2 {
	font-size: clamp(1.75rem, 3.2vw, 2.6rem);
	letter-spacing: -0.025em;
}

h3 {
	font-size: clamp(1.15rem, 1.8vw, 1.35rem);
	font-weight: 600;
}

h4 {
	font-size: 1.1rem;
	font-weight: 600;
}

p {
	color: var(--text-secondary);
	font-size: 1.02rem;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	list-style: none;
}

strong {
	font-weight: 600;
	color: var(--text-primary);
}

/* ============================================
   HEADER
   ============================================ */

.header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	padding: 0 24px;
	transition: all 0.4s var(--ease-out);
}

.header.scrolled {
	background: rgba(8, 17, 28, 0.82);
	backdrop-filter: blur(24px) saturate(1.2);
	-webkit-backdrop-filter: blur(24px) saturate(1.2);
	border-bottom: 1px solid var(--border);
}

.header-inner {
	max-width: 1180px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	height: 70px;
}

.logo {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--text-primary);
	letter-spacing: -0.03em;
}

.logo .dot {
	color: var(--amber);
	font-weight: 800;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin-left: auto;
}

.nav-links a {
	font-family: var(--font-body);
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--text-muted);
	padding: 7px 14px;
	border-radius: 6px;
	transition: all 0.25s ease;
}

.nav-links a:hover {
	color: var(--text-primary);
	background: rgba(94, 128, 170, 0.06);
}

.nav-cta {
	font-weight: 600 !important;
	color: var(--bg-deep) !important;
	background: var(--amber) !important;
	padding: 8px 20px !important;
	margin-left: 8px;
	transition: all 0.25s ease !important;
}

.nav-cta:hover {
	background: var(--amber-soft) !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

.lang-switch {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 5px 10px;
	margin-left: 12px;
	transition: all 0.2s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.lang-switch:hover {
	color: var(--text-primary);
	border-color: var(--text-muted);
}

.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}

.nav-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--text-secondary);
	border-radius: 2px;
	transition: all 0.3s ease;
}

/* ---- Nav Dropdown ---- */

.has-dropdown { position: relative; }
.has-dropdown > a { display: inline-flex; align-items: center; gap: 4px; }

.dd-arrow {
	transition: transform 0.25s var(--ease-out);
	opacity: 0.5;
	vertical-align: middle;
}

.has-dropdown:hover .dd-arrow,
.has-dropdown.open .dd-arrow {
	transform: rotate(180deg);
	opacity: 1;
}

.nav-dropdown {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: all 0.25s var(--ease-out);
	padding-top: 14px;
	z-index: 110;
}

.has-dropdown:hover .nav-dropdown {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.nav-dropdown-inner {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 28px;
	background: var(--bg-card);
	border: 1px solid var(--border-hover);
	border-radius: var(--radius-md);
	padding: 24px 28px;
	min-width: 700px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(94, 128, 170, 0.06);
}

.nav-dropdown-heading {
	font-family: var(--font-mono);
	font-size: 0.63rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border);
}

.nav-dropdown-col--blue .nav-dropdown-heading { color: var(--blue-soft); }
.nav-dropdown-col--amber .nav-dropdown-heading { color: var(--amber-soft); }
.nav-dropdown-col--teal .nav-dropdown-heading { color: var(--teal-soft); }
.nav-dropdown-col--red .nav-dropdown-heading { color: var(--red-soft); }

.nav-dropdown-col a {
	display: block;
	font-size: 0.82rem;
	color: var(--text-muted) !important;
	padding: 5px 0 !important;
	background: none !important;
	border-radius: 0 !important;
	transition: color 0.2s ease !important;
}

.nav-dropdown-col a:hover {
	color: var(--text-primary) !important;
	background: none !important;
}

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

.footer {
	padding: 60px 0 28px;
	background: var(--bg-deep);
	border-top: 1px solid var(--border);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	gap: 40px;
	margin-bottom: 44px;
}

.footer-brand {
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--text-primary);
	margin-bottom: 10px;
	letter-spacing: -0.02em;
}

.footer-brand .dot { color: var(--amber); }

.footer-desc {
	font-size: 0.87rem;
	line-height: 1.6;
	margin-bottom: 18px;
	max-width: 300px;
	color: var(--text-muted);
}

.footer-certs {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.footer-cert {
	font-family: var(--font-mono);
	font-size: 0.63rem;
	font-weight: 500;
	color: var(--text-faint);
	letter-spacing: 0.04em;
	padding: 4px 9px;
	border: 1px solid var(--border);
	border-radius: 4px;
}

.footer-heading {
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: 500;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--text-faint);
	margin-bottom: 18px;
}

.footer-links {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.footer-links a {
	font-size: 0.88rem;
	color: var(--text-muted);
	transition: color 0.2s ease;
	padding: 6px 0;
}

.footer-links a:hover {
	color: var(--text-primary);
}

.footer-address {
	font-size: 0.82rem;
	color: var(--text-faint);
	line-height: 1.6;
	margin-top: 14px;
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 22px;
	border-top: 1px solid var(--border);
}

.footer-bottom p,
.footer-bottom a {
	font-size: 0.78rem;
	color: var(--text-faint);
}

.footer-bottom a:hover {
	color: var(--text-muted);
}

/* ============================================
   RESPONSIVE — Header, Footer, Layout
   ============================================ */

@media (max-width: 1024px) {
	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 36px;
	}
}

@media (max-width: 768px) {
	body.nav-open { overflow: hidden; }

	.nav-links { display: none; }
	.nav-toggle { display: flex; order: 3; }
	.lang-switch { order: 2; margin-left: auto; margin-right: 12px; }

	.nav-links.active {
		display: flex;
		flex-direction: column;
		position: fixed;
		top: 70px;
		left: 0;
		right: 0;
		height: calc(100vh - 70px);
		height: calc(100dvh - 70px);
		background: var(--bg-deep);
		padding: 28px 24px;
		gap: 8px;
		border-top: 1px solid var(--border);
		z-index: 99;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.nav-links.active a {
		font-size: 1rem;
		padding: 12px 16px;
	}

	/* Mobile dropdown — inline expand */
	.nav-dropdown {
		position: static !important;
		transform: none !important;
		padding-top: 0 !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		display: none;
	}

	.has-dropdown.open .nav-dropdown {
		display: block;
	}

	.nav-dropdown-inner {
		display: flex !important;
		flex-direction: column;
		gap: 16px;
		min-width: 0 !important;
		padding: 12px 16px !important;
		background: var(--bg-raised) !important;
		border-radius: var(--radius-sm) !important;
		box-shadow: none !important;
		margin-top: 4px;
	}

	.nav-dropdown-col a {
		padding: 10px 0 !important;
		font-size: 0.9rem !important;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.footer-bottom {
		flex-direction: column;
		gap: 10px;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.container { padding: 0 16px; }
}
