/* site.css — design tokens and chrome shared by every page (layouts/base.html).
   Ported from the Claude Design project "JustBot". Page-specific styles live in
   landing.css / auth.css. */

:root {
	--bg:           #ffffff;
	--bg-alt:       #f5f5f7;
	--ink:          #1d1d1f;
	--ink-2:        #6e6e73;
	--ink-3:        #a1a1a6;
	--line:         #e5e5e7;
	--line-2:       #d2d2d7;
	--accent:       #2aabee;   /* Telegram blue, used sparingly */
	--accent-deep:  #1b8fcc;
	--accent-soft:  #e6f4fb;
	--radius:       18px;
	--maxw:         1120px;
	--font:         "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
	--mono:         ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }

body {
	position: relative;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.47;
	letter-spacing: -0.005em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
body > main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Background: blue halo ──────────────────────────────────── */
body[data-bg="glow"] {
	background:
		radial-gradient(1400px 750px at 50% -120px, rgba(42, 171, 238, .26), transparent 62%),
		radial-gradient(900px 500px at 88% 480px, rgba(180, 140, 255, .10), transparent 65%),
		radial-gradient(900px 500px at 12% 480px, rgba(42, 171, 238, .08), transparent 65%),
		#ffffff;
}

.grain {
	position: fixed; inset: 0; z-index: 1; pointer-events: none;
	opacity: 0; mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
	transition: opacity .6s ease;
}
body[data-bg="glow"] .grain { opacity: .35; }

/* ── Type scale ─────────────────────────────────────────────── */
.display {
	font-size: clamp(44px, 7.2vw, 96px);
	line-height: 1.04;
	letter-spacing: -0.035em;
	font-weight: 600;
}
.display-2 {
	font-size: clamp(36px, 5.4vw, 72px);
	line-height: 1.06;
	letter-spacing: -0.03em;
	font-weight: 600;
}
.eyebrow {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-2);
}
.lead {
	font-size: clamp(19px, 1.7vw, 24px);
	line-height: 1.4;
	color: var(--ink-2);
	font-weight: 400;
	letter-spacing: -0.005em;
}
.ink-soft {
	color: transparent;
	background: linear-gradient(180deg, #5e5e63 0%, #9b9ba0 100%);
	-webkit-background-clip: text;
	background-clip: text;
}

/* ── Layout ─────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 120px 0; position: relative; }
@media (max-width: 720px) { section { padding: 84px 0; } }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	gap: 6px; padding: 12px 22px; border-radius: 980px;
	font-size: 15px; font-weight: 500; letter-spacing: -0.005em;
	border: 1px solid transparent; cursor: pointer; transition: all .2s ease;
	white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-primary svg { width: 14px; height: 14px; margin-left: 2px; }
.btn-ghost { color: var(--accent); }
.btn-ghost:hover { color: var(--accent-deep); }
.btn-ghost::after {
	content: "›"; margin-left: 2px; font-size: 18px; line-height: 1;
	transition: transform .2s ease; display: inline-block;
}
.btn-ghost:hover::after { transform: translateX(3px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-1px); }

/* ── Reveal on scroll ───────────────────────────────────────── */
.reveal {
	opacity: 0;
	transform: translateY(32px) scale(.985);
	filter: blur(6px);
	transition:
		opacity 1s cubic-bezier(.22, .61, .36, 1),
		transform 1.1s cubic-bezier(.22, .61, .36, 1),
		filter .9s cubic-bezier(.22, .61, .36, 1);
	will-change: opacity, transform, filter;
}
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; filter: none; transition: none; }
	.parallax-y { transform: none !important; }
}

.scroll-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 2px;
	z-index: 100; pointer-events: none;
	background: linear-gradient(90deg, var(--accent) 0%, #b48cff 60%, #ffb27a 100%);
	transform-origin: 0 50%;
	transform: scaleX(var(--scroll, 0));
	opacity: 0;
	transition: opacity .25s ease;
}
body.has-scrolled .scroll-progress { opacity: 1; }

.parallax-y { will-change: transform; }

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
	position: sticky; top: 0; z-index: 50;
	background: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	border-bottom: 1px solid transparent;
	transition: background .25s ease, border-color .25s ease,
		-webkit-backdrop-filter .25s ease, backdrop-filter .25s ease;
}
.nav.scrolled {
	background: rgba(255, 255, 255, .72);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom-color: rgba(0, 0, 0, .06);
}
.nav-inner {
	max-width: var(--maxw); margin: 0 auto;
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 24px;
}
.brand {
	display: inline-flex; align-items: baseline; gap: 0;
	font-weight: 700;
	font-size: 22px;
	letter-spacing: -0.035em;
	line-height: 1;
	color: var(--ink);
}
.brand-dot {
	display: inline-block;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--accent);
	align-self: flex-end;
	margin-bottom: 3px;
	margin-left: 3px;
}
.nav-links { display: flex; gap: 6px; background: transparent; }
.nav-links a {
	font-size: 14px; color: var(--ink);
	padding: 6px 12px; border-radius: 980px;
	transition: background .15s ease, color .15s ease;
	font-weight: 450;
}
.nav-links a:hover { background: rgba(0, 0, 0, .05); }
/* Direct children only - the language switcher nests its own links. */
@media (max-width: 720px) {
	.nav-links > a:not(:first-child):not(:last-child) { display: none; }
}

/* ── Language switcher ──────────────────────────────────────── */
.lang-switch {
	display: inline-flex; align-items: center; gap: 2px;
	margin: 0 4px; padding: 2px;
	border-radius: 980px;
	background: rgba(0, 0, 0, .045);
}
.lang-switch a {
	padding: 4px 9px; border-radius: 980px;
	font-size: 12px; font-weight: 600; line-height: 1.25;
	letter-spacing: .02em;
	color: var(--ink-3);
	transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.lang-switch a:hover { background: transparent; color: var(--ink); }
.lang-switch a.is-active {
	background: #fff; color: var(--ink);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .07);
}

/* ── Small shared atoms ─────────────────────────────────────── */
.chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 4px 10px; border-radius: 980px;
	font-size: 12px; font-weight: 500;
	background: #fff; border: 1px solid var(--line); color: var(--ink-2);
	white-space: nowrap;
}
.chip.live { color: var(--accent-deep); background: var(--accent-soft); border-color: transparent; }
.chip.live .ic-dot {
	width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
	box-shadow: 0 0 0 0 rgba(42, 171, 238, .6);
	animation: pulse 2.2s infinite;
}
.chip.saved, .chip.saved svg { color: #1f8a5b; }

.kbd {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 5px;
	background: #fff; border: 1px solid var(--line);
	box-shadow: 0 1px 0 var(--line-2);
	font-family: var(--mono); font-size: 11px; color: var(--ink-2);
}

@keyframes pulse {
	0%   { box-shadow: 0 0 0 0 rgba(42, 171, 238, .55); }
	70%  { box-shadow: 0 0 0 9px rgba(42, 171, 238, 0); }
	100% { box-shadow: 0 0 0 0 rgba(42, 171, 238, 0); }
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
	flex-shrink: 0;
	padding: 72px 0 32px;
	border-top: 1px solid var(--line);
	background: var(--bg);
}
.foot-grid {
	display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
	margin-bottom: 48px;
}
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-brand p { color: var(--ink-2); font-size: 14px; margin: 14px 0 18px; line-height: 1.55; }
.foot-meta { display: flex; gap: 8px; }
.site-footer h5 {
	margin: 0 0 14px; font-size: 12px; font-weight: 600;
	letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2);
}
.site-footer .foot-grid a {
	display: block; font-size: 14px; color: var(--ink); opacity: .75;
	margin-top: 10px; transition: opacity .15s ease;
}
.site-footer .foot-grid a:hover { opacity: 1; }
.foot-bottom {
	display: flex; justify-content: space-between; align-items: center;
	padding-top: 28px; border-top: 1px solid var(--line);
	flex-wrap: wrap; gap: 14px;
}
.foot-bottom small { color: var(--ink-2); font-size: 13px; }
.foot-links { display: flex; gap: 24px; }
.foot-links a { font-size: 13px; color: var(--ink-2); transition: color .15s ease; }
.foot-links a:hover { color: var(--ink); }
