/*
 * SELDO — the marketing site.
 *
 * One stylesheet for the whole site. Dark by default and only dark: the
 * product's own screenshots are dark, and a light marketing page wrapped
 * around dark screenshots looks like two different products.
 *
 * Everything is driven by the tokens below so a change of accent or spacing is
 * one edit rather than a search. Type scales with the viewport via `clamp()`,
 * which is what keeps the headline from wrapping badly on a phone without a
 * separate mobile stylesheet.
 */

:root {
	/* The brand green, taken from the product's own accent. */
	--accent: #16d992;
	--accent-dim: #0fa972;
	--accent-glow: rgb(22 217 146 / 18%);

	--bg: #07090c;
	--bg-raised: #0d1117;
	--bg-card: #111820;
	--line: #1e2732;
	--line-bright: #2b3745;

	--text: #e8edf4;
	--text-dim: #97a3b4;
	--text-faint: #5f6b7a;

	--radius: 14px;
	--radius-lg: 22px;

	--page: 1200px;
	--gutter: clamp(20px, 5vw, 48px);

	--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--font-display: "Unbounded", var(--font);
}

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

html {
	scroll-behavior: smooth;
	/* The sticky header must not cover an anchor's heading. */
	scroll-padding-top: 96px;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	display: block;
}

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

/* ── Layout ─────────────────────────────────────────────────────────── */

.wrap {
	width: 100%;
	max-width: var(--page);
	margin: 0 auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: clamp(72px, 11vw, 140px);
	position: relative;
}

.section--tight {
	padding-block: clamp(48px, 7vw, 88px);
}

/* ── Type ───────────────────────────────────────────────────────────── */

h1,
h2,
h3 {
	margin: 0;
	line-height: 1.12;
	letter-spacing: -0.022em;
	font-weight: 700;
}

h1 {
	font-size: clamp(2.2rem, 5.4vw, 3.9rem);
}

h2 {
	font-size: clamp(1.85rem, 3.9vw, 2.9rem);
}

h3 {
	font-size: clamp(1.1rem, 1.9vw, 1.35rem);
	letter-spacing: -0.012em;
}

p {
	margin: 0;
}

.lede {
	font-size: clamp(1.05rem, 1.9vw, 1.28rem);
	color: var(--text-dim);
	max-width: 62ch;
	line-height: 1.6;
}

.eyebrow {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 18px;
	display: block;
}

.muted {
	color: var(--text-dim);
}

.faint {
	color: var(--text-faint);
	font-size: 0.9rem;
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 14px 26px;
	border-radius: 999px;
	border: 1px solid transparent;
	font: inherit;
	font-size: 0.97rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
	white-space: nowrap;
}

.btn:hover {
	transform: translateY(-2px);
}

.btn--primary {
	background: var(--accent);
	color: #04140d;
	box-shadow: 0 8px 30px var(--accent-glow);
}

.btn--primary:hover {
	background: #22e8a0;
}

.btn--ghost {
	border-color: var(--line-bright);
	color: var(--text);
	background: transparent;
}

.btn--ghost:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.btn--sm {
	padding: 10px 20px;
	font-size: 0.9rem;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
	border-bottom: 1px solid transparent;
}

/* Solid only once the page has moved, so the hero is uninterrupted. */
.header.is-stuck {
	background: rgb(7 9 12 / 82%);
	backdrop-filter: blur(14px);
	border-bottom-color: var(--line);
}

.header__inner {
	display: flex;
	align-items: center;
	gap: 28px;
	height: 76px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 11px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.22rem;
	letter-spacing: -0.01em;
	flex-shrink: 0;
}

.brand img {
	width: 30px;
	height: 30px;
}

.nav {
	display: flex;
	align-items: center;
	gap: 30px;
	margin-left: auto;
}

.nav a {
	font-size: 0.95rem;
	color: var(--text-dim);
	transition: color 0.16s ease;
	position: relative;
}

.nav a:hover,
.nav a[aria-current="page"] {
	color: var(--text);
}

.nav a[aria-current="page"]::after {
	content: "";
	position: absolute;
	inset: auto 0 -7px;
	height: 2px;
	background: var(--accent);
	border-radius: 2px;
}

.header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.lang {
	display: flex;
	gap: 2px;
	padding: 3px;
	border: 1px solid var(--line);
	border-radius: 999px;
}

.lang a {
	background: none;
	border: 0;
	color: var(--text-faint);
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 5px 11px;
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.16s ease, background 0.16s ease;
}

.lang a.is-active {
	background: var(--bg-card);
	color: var(--text);
}

.burger {
	display: none;
	background: none;
	border: 0;
	color: var(--text);
	cursor: pointer;
	padding: 8px;
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
	position: relative;
	/*
	 * Clears the fixed header and no more.
	 *
	 * This was `clamp(140px, 18vw, 210px)` — 210px on a laptop, against a
	 * 76px header — so the badge started a third of the way down the screen
	 * and the two call-to-action buttons fell below the fold. The first thing
	 * a visitor sees has to include the thing you want them to click.
	 */
	padding-top: clamp(104px, 11vw, 148px);
	padding-bottom: clamp(48px, 6vw, 80px);
	overflow: hidden;
}

/*
 * A single soft light behind the headline. Pure CSS rather than an image, so
 * it costs nothing and stays sharp at any size.
 */
.hero::before {
	content: "";
	position: absolute;
	top: -240px;
	left: 50%;
	width: min(1100px, 130vw);
	height: 620px;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, rgb(22 217 146 / 15%), transparent 72%);
	pointer-events: none;
	/* Follows the pointer. The properties are declared here so the effect
	   degrades to a fixed light rather than vanishing when JS is off. */
	left: var(--glow-x, 50%);
	transition: none;
}

.hero__inner {
	position: relative;
	text-align: center;
	display: grid;
	justify-items: center;
	gap: clamp(18px, 2.2vw, 26px);
}

.hero h1 {
	max-width: 17ch;
}

.hero .lede {
	max-width: 56ch;
}

.hero__cta {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	justify-content: center;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 7px 16px 7px 8px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg-raised);
	font-size: 0.85rem;
	color: var(--text-dim);
}

.pill b {
	background: var(--accent);
	color: #04140d;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.76rem;
	font-weight: 700;
}

/* ── Screenshot frame ───────────────────────────────────────────────── */

.shot {
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--bg-raised);
	box-shadow: 0 40px 90px rgb(0 0 0 / 55%);
	position: relative;
}

.shot__bar {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 13px 18px;
	border-bottom: 1px solid var(--line);
	background: var(--bg-card);
}

.shot__bar i {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--line-bright);
	display: block;
}

.shot__bar span {
	margin-left: 12px;
	font-size: 0.78rem;
	color: var(--text-faint);
	font-family: ui-monospace, monospace;
}

.shot img {
	/*
	 * `height: auto` is load-bearing, not tidiness.
	 *
	 * The markup carries width="2880" height="1800" so the browser can reserve
	 * the right box before the file arrives. Without this rule the height
	 * attribute stays the used height, so every screenshot rendered 1800px
	 * tall inside a column a few hundred pixels wide — stretched vertically
	 * into an unreadable smear on every page that showed one.
	 */
	display: block;
	width: 100%;
	height: auto;
	/* Matches the shots themselves; keeps the frame from collapsing while the
	   image loads and while a language swap replaces the file. */
	aspect-ratio: 8 / 5;
	object-fit: cover;
	object-position: top left;
}

.hero__shot {
	margin-top: clamp(32px, 4.5vw, 60px);
	perspective: 1600px;
}

/* ── Cards and grids ────────────────────────────────────────────────── */

.grid {
	display: grid;
	gap: 22px;
}

.grid--2 {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
	grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}

.grid--4 {
	grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
}

.card {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 30px 28px;
	transition: border-color 0.22s ease, transform 0.22s ease;
}

.card:hover {
	border-color: var(--line-bright);
	transform: translateY(-3px);
}

.card h3 {
	margin-bottom: 11px;
}

.card p {
	color: var(--text-dim);
	font-size: 0.96rem;
}

.card__icon {
	width: 42px;
	height: 42px;
	border-radius: 11px;
	display: grid;
	place-items: center;
	background: rgb(22 217 146 / 10%);
	color: var(--accent);
	margin-bottom: 20px;
}

.card__icon svg {
	width: 21px;
	height: 21px;
}

.section__head {
	max-width: 58ch;
	margin-bottom: clamp(38px, 5vw, 58px);
	display: grid;
	gap: 16px;
}

.section__head--center {
	margin-inline: auto;
	text-align: center;
	justify-items: center;
}

/* ── Split rows ─────────────────────────────────────────────────────── */

.split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
	gap: clamp(36px, 5vw, 70px);
	align-items: center;
}

.split--flip .split__text {
	order: 2;
}

.split__text {
	display: grid;
	gap: 18px;
	align-content: start;
}

.checks {
	display: grid;
	gap: 13px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.checks li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	color: var(--text-dim);
	font-size: 0.97rem;
}

.checks svg {
	width: 19px;
	height: 19px;
	flex-shrink: 0;
	margin-top: 3px;
	color: var(--accent);
}

/* ── Numbers ────────────────────────────────────────────────────────── */

.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: clamp(28px, 4vw, 44px);
	background: linear-gradient(180deg, var(--bg-card), var(--bg-raised));
}

.stat {
	text-align: center;
}

.stat b {
	display: block;
	font-size: clamp(1.9rem, 3.6vw, 2.7rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
}

.stat span {
	color: var(--text-dim);
	font-size: 0.92rem;
}

/* ── Pricing ────────────────────────────────────────────────────────── */

.plans {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	align-items: stretch;
}

.plan {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 32px 28px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: relative;
	transition: border-color 0.22s ease, transform 0.22s ease;
}

/* The call to action sits on the floor of the card, so a row of plans with
   different numbers of bullets still reads as one row of buttons. */
.plan > .btn {
	margin-top: auto;
}

.plan:hover {
	transform: translateY(-4px);
	border-color: var(--line-bright);
}

.plan--featured {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent), 0 24px 60px var(--accent-glow);
}

.plan__tag {
	position: absolute;
	top: -12px;
	left: 28px;
	background: var(--accent);
	color: #04140d;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 5px 13px;
	border-radius: 999px;
}

.plan__price {
	font-size: clamp(1.7rem, 3vw, 2.2rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
	/* The period wraps as a whole or not at all: Russian's "/ в месяц" broke
	   across two lines and left "месяц" orphaned under the figure. */
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 7px;
	line-height: 1.15;
}

.plan__price small {
	white-space: nowrap;
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--text-faint);
	letter-spacing: 0;
}

.plan ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 11px;
	font-size: 0.93rem;
	color: var(--text-dim);
}

.plan li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.plan li svg {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	margin-top: 3px;
	color: var(--accent);
}

/* ── Form ───────────────────────────────────────────────────────────── */

.form {
	display: grid;
	gap: 18px;
}

.field {
	display: grid;
	gap: 8px;
}

.field label {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--text-dim);
}

.field input,
.field select,
.field textarea {
	width: 100%;
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 13px 15px;
	color: var(--text);
	font: inherit;
	font-size: 0.97rem;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-glow);
}

.field textarea {
	resize: vertical;
	min-height: 118px;
}

.field--row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
}

.form__note {
	font-size: 0.85rem;
	color: var(--text-faint);
}

.form__status {
	padding: 13px 16px;
	border-radius: 10px;
	font-size: 0.93rem;
	display: none;
}

.form__status.is-ok {
	display: block;
	background: rgb(22 217 146 / 10%);
	border: 1px solid rgb(22 217 146 / 35%);
	color: var(--accent);
}

.form__status.is-error {
	display: block;
	background: rgb(255 92 92 / 9%);
	border: 1px solid rgb(255 92 92 / 32%);
	color: #ff8a8a;
}

/* ── FAQ ────────────────────────────────────────────────────────────── */

.faq {
	display: grid;
	gap: 12px;
}

.faq details {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-card);
	overflow: hidden;
}

.faq summary {
	cursor: pointer;
	padding: 20px 24px;
	font-weight: 600;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 20px;
	align-items: center;
}

.faq summary::-webkit-details-marker {
	display: none;
}

.faq summary::after {
	content: "+";
	color: var(--accent);
	font-size: 1.4rem;
	line-height: 1;
	transition: transform 0.2s ease;
}

.faq details[open] summary::after {
	transform: rotate(45deg);
}

.faq p {
	padding: 0 24px 22px;
	color: var(--text-dim);
	font-size: 0.96rem;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.footer {
	border-top: 1px solid var(--line);
	padding-block: 56px 40px;
	margin-top: clamp(60px, 8vw, 100px);
}

.footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 36px;
	margin-bottom: 40px;
}

.footer h4 {
	margin: 0 0 16px;
	font-size: 0.8rem;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--text-faint);
	font-weight: 600;
}

.footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 11px;
}

.footer a {
	color: var(--text-dim);
	font-size: 0.94rem;
	transition: color 0.16s ease;
}

.footer a:hover {
	color: var(--accent);
}

.footer__base {
	border-top: 1px solid var(--line);
	padding-top: 26px;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: space-between;
	color: var(--text-faint);
	font-size: 0.88rem;
}

/* ── CTA band ───────────────────────────────────────────────────────── */

.cta {
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: clamp(40px, 6vw, 72px);
	text-align: center;
	display: grid;
	gap: 22px;
	justify-items: center;
	background:
		radial-gradient(120% 140% at 50% 0%, rgb(22 217 146 / 11%), transparent 62%),
		var(--bg-card);
}

/* ── Motion ─────────────────────────────────────────────────────────── */

/*
 * Anything GSAP will animate in starts hidden, but **only when the script is
 * going to run**. `.js` is set on <html> by the head script, so a browser with
 * JavaScript disabled — or one where the CDN failed — shows the page as
 * ordinary static content rather than a blank screen.
 */
.js [data-anim] {
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.js [data-anim] {
		opacity: 1;
	}

	html {
		scroll-behavior: auto;
	}
}

/* ── Small screens ──────────────────────────────────────────────────── */

@media (max-width: 860px) {
	.burger {
		display: block;
		margin-left: auto;
	}

	.nav {
		position: fixed;
		inset: 76px 0 auto;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--bg-raised);
		border-bottom: 1px solid var(--line);
		padding: 10px var(--gutter) 22px;
		margin: 0;
		transform: translateY(-12px);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.2s ease, transform 0.2s ease;
	}

	.nav.is-open {
		opacity: 1;
		transform: none;
		pointer-events: auto;
	}

	.nav a {
		padding: 13px 0;
		border-bottom: 1px solid var(--line);
	}

	.nav a[aria-current="page"]::after {
		display: none;
	}

	.header__actions .btn {
		display: none;
	}

	.split--flip .split__text {
		order: 0;
	}
}


/* ── Motion primitives ──────────────────────────────────────────────── */

/*
 * A headline is animated a word at a time, each word rising out of a mask.
 * The mask is what makes it read as one movement rather than as text fading
 * in — the words come from *behind* the line above, the way print does.
 */
.word {
	display: inline-block;
	overflow: hidden;
	vertical-align: bottom;
	/* Descenders on g, y and q are clipped by the mask without this. */
	padding-bottom: 0.12em;
	margin-bottom: -0.12em;
}

.word__in {
	display: inline-block;
	will-change: transform;
}

/*
 * A light that follows the cursor across a card.
 *
 * One extra layer, painted only on hover, positioned from two custom
 * properties the pointer handler writes. No layout is read or changed, so it
 * cannot cost a frame during scroll.
 */
[data-spotlight] {
	position: relative;
	isolation: isolate;
}

[data-spotlight]::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.35s ease;
	background: radial-gradient(
		420px circle at var(--mx, 50%) var(--my, 50%),
		rgb(22 217 146 / 9%),
		transparent 62%
	);
	z-index: -1;
}

[data-spotlight]:hover::after {
	opacity: 1;
}

[data-magnetic] {
	will-change: transform;
}

[data-tilt] {
	transform-style: preserve-3d;
	will-change: transform;
}

/*
 * The header stays put.
 *
 * It used to slide away when scrolling down, which is fashionable and wrong
 * here: this is a short site whose whole navigation lives in that bar, and
 * hiding it means scrolling back to the top to reach another page.
 */
.header {
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* A link's underline grows from the left rather than appearing whole. */
.nav a {
	position: relative;
}

.nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 2px;
	border-radius: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav a:hover::after,
.nav a.is-current::after {
	transform: scaleX(1);
}

/*
 * Buttons lift and light up.
 *
 * The sheen is a single translated gradient rather than a filter, because a
 * filter on a button forces a repaint of everything behind it.
 */
.btn {
	position: relative;
	overflow: hidden;
}

.btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		110deg,
		transparent 20%,
		rgb(255 255 255 / 14%) 50%,
		transparent 80%
	);
	transform: translateX(-120%);
	transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}

.btn:hover::before {
	transform: translateX(120%);
}

.shot {
	transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.shot:hover {
	border-color: var(--line-bright);
	box-shadow: 0 50px 110px rgb(0 0 0 / 65%), 0 0 0 1px rgb(22 217 146 / 12%);
}

/*
 * Nothing above is essential, so all of it stops when the reader has asked
 * for less movement. The page keeps its colours, its depth and its hovers —
 * only the travel is removed.
 */
@media (prefers-reduced-motion: reduce) {
	.word,
	.word__in {
		overflow: visible;
		transform: none !important;
	}

	.btn::before {
		display: none;
	}
}

/*
 * Controls whose width is reserved for the widest language centre their text.
 *
 * Reserving the space stops the header jumping when the language changes, but
 * left-aligned text inside an over-wide box leaves a ragged gap after the
 * short translations — "О нас" sat against the left of a box sized for
 * "Bog'lanish". Centring makes the slack symmetrical, so the reservation
 * reads as spacing rather than as a mistake.
 */
.nav a,
.header__actions .btn {
	text-align: center;
}

/* ── Screenshot carousel ────────────────────────────────────────────────
 *
 * Native scroll-snap rather than a library. The browser already does
 * momentum, touch, keyboard and accessibility properly; a JavaScript
 * carousel re-implements all four and usually gets two of them wrong. The
 * buttons just scroll the track.
 */

.carousel {
	position: relative;
}

.carousel__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 4px 4px 18px;
	/* Firefox and the standard; the WebKit bar is hidden below. */
	scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
	display: none;
}

.carousel__slide {
	flex: 0 0 min(760px, 82%);
	scroll-snap-align: center;
	margin: 0;
}

@media (max-width: 640px) {
	.carousel__slide {
		flex-basis: 90%;
	}
}

.carousel__slide figcaption {
	margin-top: 14px;
	font-size: 0.92rem;
	color: var(--text-dim);
	text-align: center;
}

/* The frame is a button: the whole point is that it opens larger. */
.carousel__open {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	border-radius: var(--radius-lg);
}

.carousel__open:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 4px;
}

.carousel__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 6px;
}

.carousel__btn {
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--bg-card);
	color: var(--text);
	cursor: pointer;
	transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.carousel__btn:hover:not(:disabled) {
	border-color: var(--accent);
	transform: scale(1.08);
}

.carousel__btn:disabled {
	opacity: 0.32;
	cursor: default;
}

.carousel__dots {
	display: flex;
	gap: 7px;
	align-items: center;
}

.carousel__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--line-bright);
	cursor: pointer;
	transition: width 0.28s ease, background-color 0.28s ease;
}

.carousel__dot.is-active {
	width: 24px;
	border-radius: 4px;
	background: var(--accent);
}

/* ── Lightbox ───────────────────────────────────────────────────────────
 *
 * A screenshot at 760px is a thumbnail of a dense screen: readable as a
 * shape, not as a product. Opening it full width is what turns it into
 * evidence.
 */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: grid;
	place-items: center;
	padding: clamp(16px, 4vw, 56px);
	background: rgb(3 5 7 / 88%);
	backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.lightbox__figure {
	margin: 0;
	max-width: min(1500px, 100%);
	max-height: 100%;
	display: flex;
	flex-direction: column;
	gap: 14px;
	transform: scale(0.96);
	transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.lightbox.is-open .lightbox__figure {
	transform: scale(1);
}

.lightbox img {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(100vh - 150px);
	object-fit: contain;
	border-radius: var(--radius);
	border: 1px solid var(--line-bright);
	box-shadow: 0 40px 120px rgb(0 0 0 / 70%);
}

.lightbox figcaption {
	text-align: center;
	color: var(--text-dim);
	font-size: 0.95rem;
}

.lightbox__close {
	position: absolute;
	top: clamp(12px, 3vw, 26px);
	right: clamp(12px, 3vw, 26px);
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--line-bright);
	background: var(--bg-card);
	color: var(--text);
	cursor: pointer;
}

.lightbox__close:hover {
	border-color: var(--accent);
}

/* Arrows sit outside the picture on a wide screen and under it on a phone,
   where a 44px target beside the image would cover half of it. */
.lightbox__step {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--bg-card);
	color: var(--text);
	cursor: pointer;
}

.lightbox__step:hover {
	border-color: var(--accent);
}

.lightbox__step--prev { left: clamp(8px, 2vw, 28px); }
.lightbox__step--next { right: clamp(8px, 2vw, 28px); }

@media (max-width: 720px) {
	.lightbox__step { display: none; }
}

body.is-locked {
	overflow: hidden;
}

/* ── The cursor's own light ─────────────────────────────────────────────
 *
 * One fixed layer behind everything, following the pointer across the whole
 * page rather than only the hero. This is the effect that makes a flat dark
 * page feel lit; the hero's own glow was confined to the top screen and
 * mostly sat above the fold, so nobody ever saw it move.
 */
.cursor-glow {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.6s ease;
	background: radial-gradient(
		620px circle at var(--cx, 50%) var(--cy, 40%),
		rgb(22 217 146 / 7%),
		transparent 64%
	);
}

.cursor-glow.is-live {
	opacity: 1;
}

/*
 * Content sits above the light, or the light sits on top of the text.
 *
 * `.header` is deliberately not in this list: it is `position: fixed` with its
 * own z-index, and including it here reset that to `relative` — the bar
 * scrolled away with the page, which is exactly the behaviour it must not
 * have.
 */
main,
.footer {
	position: relative;
	z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
	.carousel__track {
		scroll-behavior: auto;
	}

	.lightbox,
	.lightbox__figure {
		transition: none;
	}
}

/* Past ten slides the dots become a bar and a count — see site.js. */
.carousel__dots--bar {
	gap: 14px;
	min-width: 210px;
}

.carousel__bar {
	display: block;
	flex: 1;
	height: 3px;
	border-radius: 3px;
	background: var(--line-bright);
	overflow: hidden;
}

.carousel__bar-fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 3px;
	background: var(--accent);
	transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel__count {
	font-size: 0.82rem;
	color: var(--text-faint);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
