/* ============================================================================
   gusarov.com design system — product-grade, engineered in behaviour.
   Tokens: bare :root is light; dark is served by system preference or the switch.
   An entity's Brand may override --accent inside .brand-scope.
   ========================================================================== */

:root {
	--bg: #ffffff; --bg-2: #f5f7fa; --bg-3: #eaeef3;
	--ink: #101418; --ink-2: #5b6470; --ink-3: #8b94a0; --line: #e6e9ed; --line-2: #d5dae1;
	--accent: #0a5bff; --accent-2: #e8efff; --on: #17a34a; --on-glow: rgba(23, 163, 74, .35);
	--warn: #b45f00; --warn-2: #fff4e5;
	--shadow: 0 18px 44px rgba(16, 20, 24, .12);
	--glare: rgba(255, 255, 255, .7); --glare-tint: color-mix(in srgb, var(--accent) 18%, white);
	--display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
	--radius: 14px;
	--gutter: clamp(16px, 5vw, 64px);
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0e1116; --bg-2: #141920; --bg-3: #1b222c;
		--ink: #eef1f5; --ink-2: #a3acb8; --ink-3: #6f7a87; --line: #232a34; --line-2: #2f3843;
		--accent: #4d8bff; --accent-2: #13223f; --on: #2fd36a; --on-glow: rgba(47, 211, 106, .35);
		--warn: #f0a24b; --warn-2: #2b1f0e;
		--shadow: 0 18px 44px rgba(0, 0, 0, .5);
		--glare: rgba(255, 255, 255, .09); --glare-tint: color-mix(in srgb, var(--accent) 14%, transparent);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0e1116; --bg-2: #141920; --bg-3: #1b222c;
	--ink: #eef1f5; --ink-2: #a3acb8; --ink-3: #6f7a87; --line: #232a34; --line-2: #2f3843;
	--accent: #4d8bff; --accent-2: #13223f; --on: #2fd36a; --on-glow: rgba(47, 211, 106, .35);
	--warn: #f0a24b; --warn-2: #2b1f0e;
	--shadow: 0 18px 44px rgba(0, 0, 0, .5);
	--glare: rgba(255, 255, 255, .09); --glare-tint: color-mix(in srgb, var(--accent) 14%, transparent);
	color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; min-height: 100vh; display: flex; flex-direction: column;
	background: var(--bg); color: var(--ink);
	font: 17px/1.55 var(--body);
	padding-inline: var(--gutter); overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.02em; text-wrap: balance; line-height: 1.1; }
img { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .76rem; letter-spacing: .01em; }
.muted { color: var(--ink-3); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--bg-2); padding: .5rem 1rem; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@view-transition { navigation: auto; }

.led { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); box-shadow: 0 0 0 0 var(--on-glow); transition: background .25s, box-shadow .4s; flex: none; display: inline-block; }
.led.on { background: var(--on); box-shadow: 0 0 0 4px var(--on-glow); }

/* ---------- top bar ---------- */

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; perspective: 400px; }
.logo .cube { width: 26px; height: 26px; position: relative; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.logo:hover .cube { transform: rotateX(-180deg) rotateY(180deg); }
.logo .cube i { position: absolute; inset: 0; border-radius: 6px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-style: normal; font-size: .9rem; backface-visibility: hidden; }
.logo .cube i:nth-child(2) { transform: rotateY(180deg); background: var(--accent); color: #fff; }
.bar__nav { display: flex; gap: 26px; font-weight: 500; color: var(--ink-2); }
.bar__nav a { position: relative; padding: 4px 0; }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--accent); transition: right .25s cubic-bezier(.2, .8, .2, 1); }
.bar__nav a:hover::after, .bar__nav a.is-active::after { right: 0; }
.bar__nav a:hover, .bar__nav a.is-active { color: var(--ink); }
.bar__tools { display: flex; align-items: center; gap: 14px; }

.fan { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; position: relative; background: none; border: 0; padding: 0; }
.fan svg { width: 20px; height: 20px; fill: currentColor; }
.fan:hover { color: var(--ink); }
.fan__rpm { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); color: var(--ink-3); opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap; }
.fan.live .fan__rpm { opacity: 1; }

.sw { width: 42px; height: 24px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; flex: none; padding: 0; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .32s cubic-bezier(.3, 1.5, .5, 1); }
.sw.on::after { transform: translateX(18px); }

.cta { display: inline-block; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .95rem; position: relative; overflow: hidden; border: 0; font-family: inherit; cursor: pointer; }
.cta span { display: inline-block; transition: transform .25s; }
.cta b { position: absolute; left: 0; right: 0; top: 9px; text-align: center; font-weight: 600; transform: translateY(140%); transition: transform .25s; }
.cta.done span { transform: translateY(-140%); }
.cta.done b { transform: none; }

/* ---------- main / footer ---------- */

main { flex: 1; }
.page { padding-block: 24px 16px; }
.page--narrow { max-width: 760px; }

.foot { margin-top: 56px; padding-block: 22px 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; align-items: center; color: var(--ink-3); font-size: .9rem; }
.foot a:hover { color: var(--ink); }
.foot__status { display: inline-flex; align-items: center; gap: 8px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 4px 14px; }

.crumbs { display: flex; gap: 8px; color: var(--ink-3); font-size: .85rem; margin-bottom: 18px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-2); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }

/* ---------- hero ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: center; padding-block: 64px 40px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); font-weight: 800; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; margin: 20px 0 28px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 999px; font-weight: 600; border: 1px solid var(--line-2); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* photo card */
.stage { perspective: 1100px; touch-action: none; }
.card {
	position: relative; aspect-ratio: 3 / 4; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow);
	transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .12s ease-out; overflow: hidden; display: block;
}
.card.rest { transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.card__photo { position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 20%, #c9d3df 0, #9aa7b7 45%, #5b6878 100%); display: grid; place-items: center; color: #fff; text-align: center; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__slot { font-family: var(--mono); font-size: .72rem; opacity: .85; border: 1px dashed rgba(255, 255, 255, .7); padding: 10px 14px; border-radius: 10px; letter-spacing: .06em; }
.card__glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 55%); mix-blend-mode: screen; pointer-events: none; }
.card__layer { position: absolute; left: 22px; right: 22px; transform: translateZ(var(--z)); }
.card__tag { top: 20px; --z: 34px; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.card__tag .mono { opacity: .85; }
.card__name { bottom: 74px; --z: 46px; color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; text-shadow: 0 4px 18px rgba(0, 0, 0, .35); line-height: 1.05; }
.card__name small { display: block; font-family: var(--body); font-weight: 500; font-size: .95rem; opacity: .9; margin-top: 4px; }
.card__chips { bottom: 22px; --z: 70px; display: flex; gap: 6px; flex-wrap: wrap; }
.card__chips span { background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); color: #fff; border: 1px solid rgba(255, 255, 255, .35); padding: 4px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.card__hole { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%) translateZ(20px); width: 44px; height: 18px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25); }
.stage__hint { margin-top: 12px; color: var(--ink-3); text-align: center; }

/* ---------- sections and tiles ---------- */

.section { padding-block: 26px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section__head h2 { font-size: 1.5rem; font-weight: 800; }
.section__lead { color: var(--ink-3); font-size: .95rem; margin-left: 10px; }
.section__more { color: var(--accent); font-weight: 600; white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; perspective: 1200px; }

.tile {
	position: relative; display: flex; flex-direction: column; min-height: 214px; padding: 22px; border-radius: var(--radius);
	background: var(--bg-2); border: 1px solid transparent; transform-style: preserve-3d;
	transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
	transition: transform .12s ease-out, box-shadow .2s, border-color .2s, background .2s; overflow: hidden;
}
.tile.rest { transition: transform .7s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, border-color .2s, background .2s; }
.tile:hover, .tile:focus-within, .tile.on { box-shadow: var(--shadow); border-color: var(--line-2); background: var(--bg); }
.tile__glare {
	position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
	background:
		radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), var(--glare) 0, rgba(255, 255, 255, 0) 38%),
		radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), var(--glare-tint) 0, transparent 62%);
}
.tile:hover .tile__glare, .tile.on .tile__glare { opacity: 1; }
.tile__kind { color: var(--ink-3); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tile__mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin: 16px 0 14px; background: var(--accent-2); color: var(--accent); transform: translateZ(28px); }
.tile__mark svg { width: 24px; height: 24px; }
.tile__mark img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.tile--business .tile__mark { background: var(--warn-2); color: var(--warn); }
.tile--person .tile__mark { border-radius: 50%; background: var(--bg-3); color: var(--ink-2); }
.tile h3 { font-size: 1.18rem; font-weight: 700; transform: translateZ(18px); }
.tile__desc { margin: 6px 0 0; color: var(--ink-2); font-size: .96rem; flex: 1; }
.tile__tele { margin-top: 14px; color: var(--ink-3); min-height: 1.2em; white-space: nowrap; overflow: hidden; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.tile:hover .tile__tele, .tile:focus-within .tile__tele, .tile.on .tile__tele { opacity: 1; transform: none; }
.tile__arrow { position: absolute; right: 20px; top: 20px; color: var(--ink-3); transition: transform .18s, color .18s; }
.tile:hover .tile__arrow { transform: translate(2px, -2px); color: var(--ink); }
.tile__link::after { content: ""; position: absolute; inset: 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.fact b { display: block; font-family: var(--display); font-size: 2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fact span { color: var(--ink-2); }

/* ---------- detail pages ---------- */

.head { margin: 8px 0 28px; display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.head--plain { grid-template-columns: 1fr; }
.head__mark { width: 72px; height: 72px; border-radius: 18px; background: var(--accent-2); color: var(--accent); display: grid; place-items: center; }
.head__mark svg { width: 36px; height: 36px; }
.head__mark img { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; }
.head h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
.head__sub { margin: 8px 0 0; font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.head__meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

.badge { display: inline-block; font-size: .78rem; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.badge--status { background: var(--warn-2); border-color: transparent; color: var(--warn); }

.prose { max-width: 66ch; }
.prose p { margin: 0 0 1rem; }
.lead { font-size: 1.1rem; color: var(--ink-2); }

.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr); gap: 48px; align-items: start; }
.aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 18px 20px; }
.panel__title { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 10px; }

.block { margin-top: 34px; }
.block__title { font-size: 1.25rem; font-weight: 800; margin-bottom: 14px; }

.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: .95rem; }
.facts-list dt { color: var(--ink-3); }
.facts-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.link-list__kind { display: inline-block; min-width: 5rem; color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.link-list a:hover { color: var(--accent); }

.focus { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.focus li { padding: 16px 18px; border-radius: var(--radius); background: var(--bg-2); }
.focus b { display: block; font-weight: 700; margin-bottom: 4px; }
.focus span { color: var(--ink-2); font-size: .95rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 8rem 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline__years { color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.timeline__role { font-weight: 700; }
.timeline__where { color: var(--ink-2); margin: 2px 0 0; }
.timeline__product::before { content: " · "; color: var(--ink-3); }
.timeline details { margin-top: 8px; }
.timeline summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; }
.timeline ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: .95rem; }
.timeline ul li { display: list-item; padding: 0; border: 0; margin-bottom: 4px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 6px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: .9rem; font-weight: 500; }

.dl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dl__meta { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 0; font-size: .8rem; color: var(--ink-3); }
.dl__meta div { display: grid; grid-template-columns: 4.5rem 1fr; gap: 8px; }
.dl__meta dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }

.releases { list-style: none; margin: 0; padding: 0; }
.release { padding: 14px 0; border-top: 1px solid var(--line); }
.release:first-child { border-top: 0; padding-top: 0; }
.release__head { display: flex; gap: 12px; align-items: baseline; font-weight: 700; }
.release__head time { color: var(--ink-3); font-weight: 400; font-size: .9rem; }
.release ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: .95rem; }

.figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.figs figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.figs figcaption { padding: 8px 12px; font-size: .85rem; color: var(--ink-3); }

.personal { max-width: 620px; margin: 40px auto 0; text-align: center; }
.personal__image { width: 148px; height: 148px; object-fit: cover; border-radius: 50%; margin-bottom: 18px; }
.personal h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; }
.personal__headline { margin: 6px 0 0; color: var(--ink-2); }
.personal .prose { margin: 20px auto; }
.personal .link-list { align-items: center; }
.personal .link-list__kind { display: none; }

.brand-page__head { margin: 16px 0 28px; padding: 28px 0; border-top: 3px solid var(--accent); border-bottom: 1px solid var(--line); }
.brand-page__logo { max-height: 56px; width: auto; margin-bottom: 12px; }
.brand-page__name { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 800; }
.brand-page__tagline { margin: 10px 0 0; font-size: 1.2rem; color: var(--ink-2); }
.attribution { margin-top: 40px; font-size: .85rem; color: var(--ink-3); }

.contact__email { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 4vw, 2.2rem); letter-spacing: -.02em; margin: 0 0 28px; }
.contact__email a:hover { color: var(--accent); }

/* ---------- responsive / motion ---------- */

@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; gap: 36px; padding-block: 36px 20px; }
	.stage { max-width: 320px; margin-inline: auto; width: 100%; }
	.bar__nav, .bar .cta { display: none; }
	.cols { grid-template-columns: 1fr; gap: 28px; }
	.aside { position: static; }
	.timeline li { grid-template-columns: 1fr; gap: 4px; }
	.head { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
	.bar { height: auto; flex-wrap: wrap; padding-block: 12px; }
	.bar__nav--mobile { display: flex; width: 100%; gap: 18px; order: 3; font-size: .95rem; }
}
@media (min-width: 901px) { .bar__nav--mobile { display: none; } }
@media (hover: none) { .stage__hint::before { content: "tilt your phone or drag the card · "; } .fan__rpm { display: none; } }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.card, .tile { transform: none !important; }
}
