/* ==========================================================================
   Bibik Electronics — design system (same family as CryptoCorrelator 3)
   Dark only: the logo is light grey on transparent.
   ========================================================================== */

:root {
	--font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--radius-xs: 6px;
	--radius-sm: 10px;
	--radius: 16px;
	--radius-lg: 22px;

	--topbar-h: 64px;
	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 32px);
	--ease: cubic-bezier(.2, .8, .2, 1);
	--t-fast: .15s var(--ease);
	--t: .3s var(--ease);

	--bg: #05070d;
	--bg-alt: #080b14;
	--surface: rgba(14, 19, 34, .72);
	--surface-solid: #0d1222;
	--surface-2: rgba(255, 255, 255, .035);
	--surface-3: rgba(255, 255, 255, .06);
	--border: rgba(148, 163, 209, .12);
	--border-strong: rgba(148, 163, 209, .24);
	--text: #e8ecf6;
	--text-2: #a3acc2;
	--text-3: #6f7894;
	--accent: #7c8cff;
	--accent-2: #22d3ee;
	--accent-soft: rgba(124, 140, 255, .14);
	--accent-grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
	--ok: #2ee59d;
	--err: #ff5c7a;
	--focus: rgba(124, 140, 255, .65);
	--shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 16px 40px -18px rgba(0, 0, 0, .7);
	--shadow-pop: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px var(--border-strong);

	color-scheme: dark;
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--topbar-h) + 16px);
	background: var(--bg);
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.6 var(--font-sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}
main { flex: 1; outline: none; }

img, svg { vertical-align: middle; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(99, 102, 241, .35); }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
.h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 750; }
.h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 720; }
.h3 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; }
.icon--xs { width: 14px; height: 14px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: fixed; left: 12px; top: -60px; z-index: 200;
	padding: 10px 16px; border-radius: var(--radius-sm);
	background: var(--accent); color: #fff;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }

.eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0 0 14px;
	font-size: 12.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
	color: var(--text-3);
}
.eyebrow .icon { width: 15px; height: 15px; }
.eyebrow--accent { color: var(--accent-2); }

.gradient-text {
	background: var(--accent-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ---------- Surfaces */
.card {
	position: relative;
	background: var(--surface-solid);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.glass {
	background: rgba(9, 12, 22, .9);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.glass {
		background: var(--surface);
		-webkit-backdrop-filter: blur(18px) saturate(150%);
		backdrop-filter: blur(18px) saturate(150%);
	}
}

/* ---------- Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 18px;
	border: 1px solid transparent; border-radius: var(--radius-sm);
	font-weight: 620; font-size: 15px; white-space: nowrap;
	text-decoration: none !important;
	transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn--lg { min-height: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn--primary {
	color: #fff;
	background: linear-gradient(135deg, #2bb8e0, #5b5ff0 60%, #8b5cf6);
	box-shadow: 0 10px 30px -10px rgba(99, 102, 241, .7), 0 1px 0 rgba(255, 255, 255, .2) inset;
}
.btn--primary:hover { box-shadow: 0 14px 36px -10px rgba(99, 102, 241, .9), 0 1px 0 rgba(255, 255, 255, .25) inset; filter: brightness(1.08); }
.btn--ghost { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-3); border-color: rgba(148, 163, 209, .4); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; pointer-events: none; }

.icon-btn {
	display: inline-grid; place-items: center;
	width: 42px; height: 42px; flex: none;
	border-radius: 12px; border: 1px solid var(--border-strong);
	background: var(--surface-2); color: var(--text);
	font-size: 20px; line-height: 1;
	transition: background var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { background: var(--surface-3); border-color: rgba(148, 163, 209, .45); }

/* ---------- Top bar */
.topbar {
	position: fixed; top: 0; left: 0; right: 0; z-index: 50;
	height: var(--topbar-h);
	transition: background var(--t), border-color var(--t), box-shadow var(--t);
	border-bottom: 1px solid transparent;
}
.topbar.is-solid {
	background: rgba(6, 8, 15, .78);
	border-bottom-color: var(--border);
	box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .8);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.topbar.is-solid { background: rgba(6, 8, 15, .6); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); }
}
.topbar__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; padding: 6px 0; border-radius: 6px; }
.brand__logo { height: 26px; width: auto; display: block; }
.brand:hover { text-decoration: none; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
	padding: 8px 14px; border-radius: 10px;
	color: var(--text-2); font-weight: 550; font-size: 15px;
	transition: color var(--t-fast), background var(--t-fast);
}
.nav a:not(.btn):hover, .nav a[aria-current] { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav__cta { margin-left: 10px; }
.nav-toggle { display: none; }

@media (max-width: 820px) {
	.nav-toggle {
		display: inline-grid; place-items: center; margin-left: auto;
		width: 44px; height: 44px; border-radius: 12px;
		border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
	}
	.nav-toggle__close { display: none; }
	.nav-open .nav-toggle__open { display: none; }
	.nav-open .nav-toggle__close { display: block; }
	.nav {
		position: fixed; top: var(--topbar-h); left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 4px;
		padding: 12px var(--gutter) 20px;
		background: #06080f;
		border-bottom: 1px solid var(--border);
		box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9);
		transform: translateY(-12px); opacity: 0; visibility: hidden;
		transition: transform var(--t), opacity var(--t), visibility 0s linear .3s;
	}
	.nav a:not(.btn) { padding: 14px 12px; font-size: 17px; }
	.nav__cta { margin: 10px 0 0; min-height: 50px; }
	.nav-open .nav { transform: none; opacity: 1; visibility: visible; transition: transform var(--t), opacity var(--t); }
	.nav-open .topbar { background: #06080f; border-bottom-color: var(--border); }
}

/* ---------- Hero (WebGL) */
.hero {
	position: relative;
	min-height: min(920px, 100vh);
	min-height: min(920px, 100svh);
	display: flex; align-items: center;
	padding: calc(var(--topbar-h) + 48px) 0 96px;
	overflow: hidden;
	isolation: isolate;
	background:
		radial-gradient(900px 600px at 78% 45%, rgba(56, 189, 248, .12), transparent 60%),
		radial-gradient(700px 500px at 95% 90%, rgba(139, 92, 246, .12), transparent 60%),
		var(--bg);
}
.hero__gl {
	position: absolute; inset: 0; z-index: -2;
	width: 100%; height: 100%;
	display: block;
	opacity: 0; transition: opacity 1.2s var(--ease);
}
.hero__gl.is-ready { opacity: 1; }
.hero__shade {
	position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		linear-gradient(90deg, rgba(5, 7, 13, .94) 0%, rgba(5, 7, 13, .78) 34%, rgba(5, 7, 13, .1) 68%, rgba(5, 7, 13, 0) 100%),
		linear-gradient(0deg, var(--bg) 0%, rgba(5, 7, 13, 0) 22%);
}
.hero__inner { position: relative; }
.hero__title { font-size: clamp(38px, 6.4vw, 76px); font-weight: 780; letter-spacing: -.035em; line-height: 1.02; max-width: 15ch; }
.hero__lead { margin-top: 22px; max-width: 56ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.stats {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
	margin: 56px 0 0; max-width: 820px;
}
.stat {
	padding: 16px 18px; border-radius: 14px;
	background: rgba(13, 18, 34, .55);
	border: 1px solid var(--border);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.stat { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.stat__value { font: 700 24px/1.1 var(--font-sans); letter-spacing: -.02em; }
.stat__label { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--text-2); }

.hero__scroll {
	position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
	width: 26px; height: 42px; border-radius: 14px; border: 1.5px solid var(--border-strong);
}
.hero__scroll span {
	position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px;
	border-radius: 2px; background: var(--text-2);
	animation: scrollhint 1.8s var(--ease) infinite;
}
@keyframes scrollhint { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

@media (max-width: 820px) {
	.hero { min-height: auto; padding-bottom: 80px; }
	.hero__shade { background: linear-gradient(180deg, rgba(5, 7, 13, .25) 0%, rgba(5, 7, 13, .8) 45%, rgba(5, 7, 13, .9) 75%, var(--bg) 100%); }
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; }
	.hero__scroll { display: none; }
}
@media (max-width: 420px) {
	.hero__actions .btn { width: 100%; }
}

/* ---------- Sections */
.section { padding: clamp(72px, 10vw, 120px) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 12%, var(--bg-alt) 88%, var(--bg) 100%); }
.section__head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 52px); }
.section__lead { margin-top: 14px; font-size: 17px; }
.page-top { padding-top: calc(var(--topbar-h) + 32px); }

/* Scroll reveal: JS marks only below-the-fold elements as pending, so nothing flashes */
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-pending { opacity: 0; transform: translateY(18px); }

/* ---------- Services */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.service {
	display: flex; flex-direction: column; gap: 12px;
	padding: 26px 24px 20px; overflow: hidden;
	transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.service::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(99, 102, 241, .16), transparent 45%);
	opacity: 0; transition: opacity var(--t);
}
.service:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-pop); }
.service:hover::before { opacity: 1; }
.service__bg {
	position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto;
	opacity: .55; pointer-events: none;
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 70%);
	mask-image: linear-gradient(180deg, transparent 0%, #000 70%);
	filter: brightness(1.6) saturate(.4);
	transition: opacity var(--t), transform .6s var(--ease);
}
.service:hover .service__bg { opacity: .8; transform: scale(1.04); }
.service > *:not(.service__bg) { position: relative; }
.service__icon {
	display: grid; place-items: center; flex: none;
	width: 48px; height: 48px; border-radius: 14px;
	color: #fff; background: var(--accent-grad);
	box-shadow: 0 10px 24px -10px rgba(99, 102, 241, .8);
}
.service__icon .icon { width: 24px; height: 24px; }
.service p { font-size: 15px; flex: 1; }
.service__more {
	align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
	margin-top: 8px; padding: 10px 0; border: 0; background: none;
	color: var(--accent-2); font-weight: 620; font-size: 15px;
}
.service__more::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card is clickable */
.service__more .icon { width: 17px; height: 17px; transition: transform var(--t-fast); }
.service:hover .service__more .icon { transform: translateX(4px); }

@media (max-width: 1080px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .services { grid-template-columns: 1fr; } }

/* ---------- Dialog sheets */
dialog { color: var(--text); }
.sheet {
	width: min(760px, calc(100vw - 24px)); max-height: min(86vh, 900px);
	padding: 0; border: 0; border-radius: var(--radius-lg);
	background: var(--surface-solid);
	box-shadow: var(--shadow-pop);
	overflow: hidden;
}
.sheet[open] { display: flex; animation: pop .28s var(--ease); }
.sheet::backdrop { background: rgba(2, 4, 10, .72); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.sheet::backdrop, .lightbox::backdrop { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet__panel { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.sheet__head {
	display: flex; gap: 16px; align-items: flex-start;
	padding: 24px 24px 18px; border-bottom: 1px solid var(--border);
}
.sheet__head .h2 { font-size: 26px; margin-bottom: 6px; }
.sheet__head .muted { font-size: 15px; }
.sheet__close { margin-left: auto; }
.sheet__body { padding: 8px 24px 24px; overflow-y: auto; overscroll-behavior: contain; }
.sheet__body .h3 { margin: 22px 0 12px; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sheet__foot { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); }

@media (max-width: 560px) {
	.sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
	.sheet__head { padding: 20px 18px 14px; }
	.sheet__head .service__icon { display: none; }
	.sheet__body { padding: 4px 18px 20px; }
	.sheet__foot { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
	.sheet__foot .btn { width: 100%; white-space: normal; text-align: center; }
}

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; color: var(--text); }
.ticks .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--accent-2); }
.ticks--compact { margin-top: 26px; }
.ticks--compact li { color: var(--text-2); }

/* ---------- Boards */
.boards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.board { overflow: hidden; transition: transform var(--t), border-color var(--t), box-shadow var(--t); }
.board:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-pop); }
.board__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none !important; }
.board__media {
	position: relative; aspect-ratio: 4 / 3; overflow: hidden;
	background:
		radial-gradient(circle at 50% 60%, rgba(99, 102, 241, .14), transparent 65%),
		repeating-linear-gradient(0deg, rgba(148, 163, 209, .05) 0 1px, transparent 1px 24px),
		repeating-linear-gradient(90deg, rgba(148, 163, 209, .05) 0 1px, transparent 1px 24px),
		#070a14;
	border-bottom: 1px solid var(--border);
}
.board__media img { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55)); transition: transform .6s var(--ease); }
.board:hover .board__media img { transform: scale(1.05) rotate(-.6deg); }
.board__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.board__go {
	position: absolute; right: 14px; top: 14px;
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	background: rgba(5, 7, 13, .7); border: 1px solid var(--border-strong); color: var(--text);
	opacity: 0; transform: translateX(-6px); transition: opacity var(--t), transform var(--t);
}
.board__go .icon { width: 16px; height: 16px; }
.board:hover .board__go, .board__link:focus-visible .board__go { opacity: 1; transform: none; }

.tags { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
	padding: 3px 9px; border-radius: 999px;
	font-size: 12.5px; font-weight: 550; color: var(--text-2);
	background: var(--surface-2); border: 1px solid var(--border);
}
.tags--lg li { padding: 5px 12px; font-size: 13.5px; }

/* ---------- Process */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.process__step { padding: 24px; }
.process__step .h3 { margin: 14px 0 8px; }
.process__step p { font-size: 15px; }
.process__num {
	display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
	font-size: 14px; font-weight: 700; color: var(--accent-2);
	background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .25);
}
.process__step:not(:last-child)::after {
	content: ""; position: absolute; top: 44px; right: -17px; width: 18px; height: 1px;
	background: linear-gradient(90deg, rgba(34, 211, 238, .5), transparent);
}
@media (max-width: 1080px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } .process__step::after { display: none; } }
@media (max-width: 560px)  { .process { grid-template-columns: 1fr; } }

/* ---------- Expertise */
.chips-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.chips__title { font-size: 13px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.chips .tags { margin-top: 12px; }
.research { margin-top: 48px; padding: clamp(22px, 4vw, 36px); max-width: 920px;
	background: linear-gradient(135deg, rgba(34, 211, 238, .06), rgba(139, 92, 246, .06)), var(--surface-solid); }
.research .h3 { font-size: 22px; margin-bottom: 12px; }
@media (max-width: 1080px) { .chips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .chips-grid { grid-template-columns: 1fr; } }

/* ---------- Team */
.person {
	display: grid; grid-template-columns: minmax(220px, 3fr) 9fr; gap: clamp(20px, 4vw, 48px);
	padding: clamp(22px, 4vw, 40px);
	background: linear-gradient(135deg, rgba(34, 211, 238, .05), rgba(139, 92, 246, .05)), var(--surface-solid);
}
.person__id { display: flex; flex-direction: column; gap: 16px; }
.person__avatar {
	display: grid; place-items: center; width: 96px; height: 96px; border-radius: 28px;
	font: 750 32px/1 var(--font-sans); letter-spacing: -.02em; color: #fff;
	background: var(--accent-grad); box-shadow: 0 18px 40px -16px rgba(99, 102, 241, .9);
}
.person__name { font-size: 22px; }
.person__role { margin: 4px 0 2px; color: var(--accent-2); font-weight: 620; font-size: 15px; }
.person__body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.person__headline { font-size: clamp(18px, 2vw, 22px); font-weight: 620; letter-spacing: -.01em; }
.person__facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; }
.person__facts > div { padding: 10px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.person__facts dt { font-weight: 720; font-size: 18px; }
.person__facts dd { margin: 0; font-size: 13px; color: var(--text-2); }
.person .tags { margin-top: 0; }
.person__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
@media (max-width: 760px) {
	.person { grid-template-columns: 1fr; }
	.person__id { flex-direction: row; align-items: center; }
	.person__avatar { width: 72px; height: 72px; border-radius: 22px; font-size: 24px; flex: none; }
}

/* ---------- Contact */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact__intro .h2 { margin-bottom: 14px; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

.form { padding: clamp(20px, 3vw, 32px); }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .form__grid { grid-template-columns: 1fr; } }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.req { color: var(--accent-2); }
.opt { font-weight: 450; color: var(--text-3); font-size: 13px; margin-left: 4px; }
.field input, .field textarea, .field select {
	width: 100%; min-height: 48px; padding: 12px 14px;
	border-radius: 12px; border: 1px solid var(--border-strong);
	background: rgba(5, 7, 13, .6); color: var(--text);
	font-size: 16px; /* no iOS zoom */
	transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); opacity: 1; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: rgba(148, 163, 209, .4); }
.field input:focus, .field textarea:focus, .field select:focus {
	outline: none; border-color: var(--accent); background: rgba(5, 7, 13, .85);
	box-shadow: 0 0 0 4px rgba(124, 140, 255, .18);
}
.field [aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 4px rgba(255, 92, 122, .12); }
.field__err { min-height: 0; font-size: 13.5px; color: var(--err); }
.field__err:empty { display: none; }
.field__row { display: flex; justify-content: space-between; gap: 12px; }
.counter { margin-left: auto; }
.select { position: relative; }
.select select { -webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer; }
.select::after {
	content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
	border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); pointer-events: none;
}
.select option { background: var(--surface-solid); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin-top: 22px; }
.form__status { font-size: 15px; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-err { color: var(--err); }
.notice { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.notice--ok { color: var(--ok); background: rgba(46, 229, 157, .08); border: 1px solid rgba(46, 229, 157, .25); }
.notice--err { color: var(--err); background: rgba(255, 92, 122, .08); border: 1px solid rgba(255, 92, 122, .25); }

.form.is-sent .form__grid, .form.is-sent .form__foot .btn { display: none; }
.form.is-sent .form__foot { margin-top: 0; }
.form.is-sent .form__status { display: flex; gap: 12px; align-items: center; font-size: 17px; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Board detail */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; color: var(--text-3); }
.crumbs a { color: var(--text-2); }
.detail { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 52px); align-items: start; }
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }
.detail__media { position: sticky; top: calc(var(--topbar-h) + 16px); }
@media (max-width: 960px) { .detail__media { position: static; } }
.viewer {
	overflow: hidden;
	background:
		radial-gradient(circle at 50% 55%, rgba(99, 102, 241, .16), transparent 65%),
		repeating-linear-gradient(0deg, rgba(148, 163, 209, .05) 0 1px, transparent 1px 28px),
		repeating-linear-gradient(90deg, rgba(148, 163, 209, .05) 0 1px, transparent 1px 28px),
		#070a14;
}
.viewer__slide { margin: 0; }
.viewer__zoom {
	position: relative; display: block; width: 100%;
	aspect-ratio: 4 / 3; padding: 0; overflow: hidden;
	border: 0; background: none; cursor: zoom-in;
}
.viewer__zoom img { position: absolute; inset: clamp(14px, 3vw, 32px); width: calc(100% - 2 * clamp(14px, 3vw, 32px)); height: calc(100% - 2 * clamp(14px, 3vw, 32px)); object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .6)); }
.viewer__hint {
	position: absolute; right: 12px; bottom: 12px;
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
	font-size: 13px; color: var(--text); background: rgba(5, 7, 13, .75); border: 1px solid var(--border-strong);
	opacity: .8; transition: opacity var(--t-fast);
}
.viewer__hint .icon { width: 15px; height: 15px; }
.viewer__zoom:hover .viewer__hint { opacity: 1; }
.viewer__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; }

.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.segmented button {
	min-height: 36px; padding: 0 16px; border: 0; border-radius: 9px;
	background: none; color: var(--text-2); font-weight: 600; font-size: 14px;
}
.segmented button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong) inset; }

.detail__info .h1 { margin-bottom: 6px; }
.detail__title { font-size: 19px; color: var(--text); margin-bottom: 12px; }
.detail__specs-title { margin: 32px 0 12px; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.specs { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.specs > div { display: grid; grid-template-columns: minmax(110px, 2fr) 5fr; gap: 12px; padding: 12px 16px; }
.specs > div:nth-child(odd) { background: var(--surface-2); }
.specs dt { color: var(--text-3); font-size: 14px; font-weight: 600; }
.specs dd { margin: 0; font-size: 15px; }
@media (max-width: 420px) { .specs > div { grid-template-columns: 1fr; gap: 2px; } }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding: 20px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
.pager__link {
	display: flex; align-items: center; gap: 12px; padding: 16px 18px;
	border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-solid);
	color: var(--text); font-weight: 620; text-decoration: none !important;
	transition: border-color var(--t-fast), background var(--t-fast);
}
.pager__link > span { display: flex; flex-direction: column; }
.pager__link--next { justify-content: flex-end; text-align: right; }
.pager__link:hover { border-color: var(--border-strong); background: var(--surface-3); }

/* ---------- Lightbox */
.lightbox {
	width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0; background: rgba(3, 4, 9, .96);
}
.lightbox[open] { display: flex; flex-direction: column; animation: fade .2s var(--ease); }
.lightbox::backdrop { background: rgba(2, 4, 10, .8); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage { flex: 1; position: relative; overflow: hidden; touch-action: none; cursor: grab; }
.lightbox__stage.is-drag { cursor: grabbing; }
.lightbox__stage img {
	position: absolute; left: 50%; top: 50%;
	max-width: 94vw; max-height: calc(100dvh - 90px);
	transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-drag: none;
}
.lightbox__bar {
	display: flex; align-items: center; gap: 8px; justify-content: flex-end;
	padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--border);
}
.lightbox__help { margin-right: auto; }
@media (max-width: 560px) { .lightbox__help { display: none; } }

/* ---------- Footer */
.footer { border-top: 1px solid var(--border); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); background: var(--bg); }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: start; }
.footer__logo { height: 22px; width: auto; display: block; margin-bottom: 12px; }
.footer__brand p { font-size: 15px; max-width: 42ch; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer__nav a { color: var(--text-2); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
.footer__nav a:hover { color: var(--text); }
.footer__legal { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .footer__inner { grid-template-columns: 1fr; } }

/* ---------- Cookie notice (only when analytics is configured) */
.consent {
	position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; max-width: 520px; margin-left: auto;
	display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center;
	padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop);
}
.consent p { flex: 1 1 240px; font-size: 14.5px; color: var(--text-2); }
.consent__actions { display: flex; gap: 8px; }

/* ---------- Motion & print */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.reveal.is-pending { opacity: 1; transform: none; }
}
@media print {
	.topbar, .hero__gl, .hero__scroll, .footer__nav, .form, .consent, .nav-toggle { display: none !important; }
	body, .section--alt, .hero { background: #fff !important; color: #000; }
	.card { box-shadow: none; border-color: #ccc; background: #fff; }
	.muted { color: #333; }
}
