/* Kosmora website. Night background, one violet accent, a short film of the app as the centrepiece. */
:root {
	--bg: #0e0c16;
	--fg: #edeafb;
	--fg-2: #c9c7d1;
	--muted: #8f8c9b;
	--dim: #5d5a69;
	--line: rgba(255, 255, 255, 0.08);
	--accent: #9b8afb;
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	--sans: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
	--display: 'Space Grotesk', var(--sans);
	--mono: 'JetBrains Mono', Consolas, monospace;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 80px;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1, h2, h3, p, ol, dl, dd {
	margin: 0;
}

button {
	font: inherit;
	color: inherit;
}

#stars {
	position: fixed;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.nebula {
	position: fixed;
	z-index: -1;
	top: -25vmax;
	right: -15vmax;
	width: 80vmax;
	height: 80vmax;
	border-radius: 50%;
	pointer-events: none;
	background: radial-gradient(circle, rgba(109, 91, 208, 0.2), transparent 62%);
	animation: drift 40s ease-in-out infinite alternate;
}

@keyframes drift {
	to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.08); }
}

/* ── Navigation ── */
.nav {
	display: flex;
	align-items: center;
	gap: 36px;
	max-width: 1680px;
	margin: 0 auto;
	padding: 20px clamp(24px, 4vw, 64px);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--fg);
	font-family: var(--display);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none;
}

.brand-mark {
	width: 28px;
	height: 28px;
}

.nav-links {
	display: flex;
	gap: 28px;
	margin-right: auto;
}

.nav-links a {
	color: var(--muted);
	font-size: 14.5px;
	text-decoration: none;
	transition: color 0.2s;
}

.nav-links a:hover {
	color: var(--fg);
}

/* ── Buttons ── */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	border-radius: 14px;
	text-decoration: none;
	font-weight: 600;
	transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), background-color 0.2s;
}

.btn:active {
	transform: translateY(1px) scale(0.99);
}

.btn-small {
	height: 38px;
	padding: 0 18px;
	border-radius: 10px;
	font-size: 14px;
}

.btn-primary {
	background: var(--fg);
	color: #15121f;
	box-shadow: 0 10px 34px -14px rgba(155, 138, 251, 0.7);
}

.btn-primary:hover {
	background: #fff;
	transform: translateY(-1px);
	box-shadow: 0 16px 40px -14px rgba(155, 138, 251, 0.85);
}

.btn-download {
	height: 64px;
	padding: 0 26px 0 22px;
}

.btn-download svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.btn-text {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	text-align: left;
}

.btn-text strong {
	font-size: 16px;
	font-weight: 600;
}

.btn-text small {
	font-size: 12.5px;
	font-weight: 500;
	opacity: 0.6;
}

/* ── Hero: the promise on the left, a film of the app on the right ── */
.hero {
	display: grid;
	grid-template-columns: minmax(400px, 0.75fr) minmax(0, 1.4fr);
	align-items: center;
	gap: 64px;
	max-width: 1680px;
	min-height: min(calc(100vh - 150px), 860px);
	margin: 0 auto;
	padding: 24px clamp(24px, 4vw, 64px) 40px;
}

.hero h1 {
	font-family: var(--display);
	font-size: clamp(36px, 3.6vw, 64px);
	line-height: 1.04;
	font-weight: 600;
	letter-spacing: -0.03em;
}

.lead {
	max-width: 480px;
	margin-top: 22px;
	color: var(--fg-2);
	font-size: clamp(17px, 1.15vw, 20px);
	line-height: 1.6;
}

.downloads {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
	margin-top: 34px;
}

.soon {
	color: var(--muted);
	font-size: 14px;
}

.showcase {
	min-width: 0;
}

/* ── The app window ──
   Drawn at 740x500 and scaled to the width of its column (main.js sets --s), so everything in it stays sharp
   and in proportion on any screen. On phones it is fluid instead. */
.fit {
	position: relative;
	width: 100%;
	aspect-ratio: 740 / 500;
}

.app {
	position: absolute;
	top: 0;
	left: 0;
	width: 740px;
	transform-origin: 0 0;
	transform: scale(var(--s, 1));
	--a-bg: #161616;
	--a-side: #1a1a1a;
	--a-card: #1e1e1e;
	--a-field: #232323;
	--a-line: #2c2c2c;
	--a-fg: #e9e7e0;
	--a-mut: #8e8c85;
	--a-add: #a8c08a;
	--a-del: #e58c80;
	--a-warn: #e0b46c;
	position: relative;
	display: flex;
	flex-direction: column;
	height: 500px;
	overflow: hidden;
	border: 1px solid #2f2f2f;
	border-radius: 16px;
	background: var(--a-bg);
	color: var(--a-fg);
	font-size: 13px;
	line-height: 1.5;
	box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), 0 0 90px -30px rgba(155, 138, 251, 0.35);
}

.app svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.app-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 36px;
	flex-shrink: 0;
	padding: 0 12px 0 14px;
	color: #77756f;
}

.app-bar svg {
	width: 16px;
	height: 16px;
	margin-right: 14px;
	stroke-width: 1.7;
}

.app-bar-left {
	display: flex;
	align-items: center;
}

.app-bar-right {
	display: flex;
	gap: 18px;
}

.app-bar-right i {
	position: relative;
	width: 10px;
	height: 10px;
}

.app-bar-right i::before,
.app-bar-right i::after {
	content: '';
	position: absolute;
	inset: 0;
	top: 50%;
	border-top: 1px solid currentColor;
}

.app-bar-right .sq::before {
	inset: 0;
	border: 1px solid currentColor;
}

.app-bar-right .sq::after {
	display: none;
}

.app-bar-right .x::before { transform: rotate(45deg); }
.app-bar-right .x::after { transform: rotate(-45deg); }

.film {
	position: relative;
	display: flex;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

.add { color: var(--a-add); }
.del { color: var(--a-del); }
.dim { color: #6f6d67; }
.film i { font-style: normal; }

/* Sidebar */
.f-side {
	display: flex;
	flex-direction: column;
	width: 200px;
	flex-shrink: 0;
	padding: 6px 10px 12px;
	background: var(--a-side);
	border-top-right-radius: 14px;
}

.f-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
}

.f-nav span {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 30px;
	padding: 0 8px;
	color: #b6b4ad;
	font-size: 13px;
}

.f-nav svg {
	width: 15px;
	height: 15px;
	opacity: 0.85;
}

.f-proj {
	margin: 16px 0 6px;
	padding: 0 8px;
	color: #d6d4cd;
	font-size: 12.5px;
	font-weight: 500;
}

.f-sessions {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.f-session {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 30px;
	padding: 0 8px;
	border-radius: 8px;
	color: #b6b4ad;
	font-size: 12.5px;
}

.f-session.active {
	background: #282828;
	color: #fff;
}

.f-session span {
	min-width: 0;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.f-session svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	color: var(--a-mut);
}

.f-session .state {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	border: 1.5px solid var(--accent);
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

.f-session .state.ok {
	position: relative;
	border-color: var(--a-add);
	background: rgba(168, 192, 138, 0.18);
	animation: none;
}

.f-session .state.ok::after {
	content: '';
	position: absolute;
	left: 2.5px;
	top: 0.5px;
	width: 3px;
	height: 6px;
	border: solid var(--a-add);
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* Main column */
.f-main {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	padding: 0 16px 14px;
}

.f-head {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 38px;
	flex-shrink: 0;
}

.f-title {
	min-width: 0;
	overflow: hidden;
	font-weight: 500;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: opacity 0.4s;
}

.f-pill {
	flex-shrink: 0;
	padding: 1px 9px;
	border: 1px solid var(--a-line);
	border-radius: 999px;
	color: var(--a-mut);
	font-size: 11.5px;
	opacity: 0;
	transition: opacity 0.4s;
}

.f-pill.on {
	opacity: 1;
}

.f-chat {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	padding-bottom: 10px;
	overflow: hidden;
}

.f-in {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.f-in.on {
	opacity: 1;
	transform: none;
}

.bubble {
	align-self: flex-start;
	padding: 7px 12px;
	border-radius: 10px;
	background: var(--a-field);
}

.thinking {
	color: var(--a-mut);
	font-size: 12.5px;
}

.thinking::after {
	content: '';
	display: inline-block;
	width: 18px;
	margin-left: 2px;
	animation: dots 1.1s steps(4, end) infinite;
	overflow: hidden;
	vertical-align: bottom;
}

@keyframes dots {
	0% { content: ''; }
	25% { content: '.'; }
	50% { content: '..'; }
	75% { content: '...'; }
}

.step {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 26px;
	padding: 0 4px;
}

.step code {
	overflow: hidden;
	color: var(--a-mut);
	font-family: var(--mono);
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.step b {
	font-weight: 600;
}

.step-state {
	position: relative;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	border: 1.5px solid #4a4a4a;
	border-radius: 50%;
	transition: border-color 0.2s, background-color 0.2s;
}

.step.running .step-state {
	border-color: var(--accent) transparent var(--accent) var(--accent);
	animation: spin 0.8s linear infinite;
}

.step.done .step-state {
	border-color: var(--a-add);
	background: rgba(168, 192, 138, 0.18);
}

.step.done .step-state::after {
	content: '';
	position: absolute;
	left: 3.5px;
	top: 1px;
	width: 3px;
	height: 6px;
	border: solid var(--a-add);
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

.f-card {
	border: 1px solid var(--a-line);
	border-radius: 11px;
	background: var(--a-card);
	transition: opacity 0.3s;
}

.f-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px 8px 12px;
}

.f-card-top > span:first-child {
	display: flex;
	gap: 8px;
	align-items: baseline;
}

.f-card-file {
	display: flex;
	gap: 10px;
	padding: 6px 12px 8px;
	border-top: 1px solid var(--a-line);
	color: var(--a-mut);
	font-family: var(--mono);
	font-size: 12px;
}

.f-card-file .st {
	color: var(--a-warn);
	font-weight: 600;
}

.f-card-file b {
	color: var(--a-fg);
	font-weight: 500;
}

.f-card.undone .f-card-file b {
	color: var(--a-mut);
	text-decoration: line-through;
}

.f-btns {
	display: flex;
	gap: 6px;
}

.fbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 26px;
	padding: 0 11px;
	border: 1px solid var(--a-line);
	border-radius: 8px;
	background: var(--a-field);
	color: var(--a-fg);
	font-size: 12.5px;
	white-space: nowrap;
	transition: background-color 0.2s, opacity 0.2s, transform 0.15s;
}

.fbtn.hot {
	background: #313131;
}

.fbtn.primary {
	border-color: transparent;
	background: var(--accent);
	color: #15131f;
	font-weight: 600;
}

.fbtn.bad {
	color: var(--a-del);
}

.fbtn.off {
	opacity: 0.45;
}

.notice {
	color: var(--a-warn);
	font-size: 12.5px;
}

/* Composer */
.f-env {
	display: flex;
	gap: 6px;
	margin-bottom: 8px;
}

.f-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 24px;
	padding: 0 9px;
	border-radius: 7px;
	background: var(--a-field);
	color: #cfcdc6;
	font-size: 12px;
	white-space: nowrap;
	transition: background-color 0.2s;
}

.f-chip svg {
	width: 12px;
	height: 12px;
	opacity: 0.7;
}

.f-chip.hot {
	background: #333;
}

.f-composer {
	position: relative;
	flex-shrink: 0;
	padding: 10px 12px 8px;
	border: 1px solid #343434;
	border-radius: 13px;
	background: #1b1b1b;
}

.f-input {
	min-height: 40px;
	padding-right: 36px;
	color: var(--a-fg);
	line-height: 1.55;
}

.f-input:empty::before {
	content: 'Describe a task, type / for commands';
	color: #66645e;
}

.f-input.typing::after {
	content: '';
	display: inline-block;
	width: 1.5px;
	height: 14px;
	margin-left: 1px;
	background: var(--accent);
	vertical-align: -2px;
	animation: caret 0.9s steps(1) infinite;
}

@keyframes caret {
	50% { opacity: 0; }
}

.f-send {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	width: 28px;
	height: 28px;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: #2a2a2a;
	color: #77756f;
	transition: background-color 0.25s, color 0.25s;
}

.f-send svg {
	width: 14px;
	height: 14px;
}

.f-send.ready {
	background: var(--accent);
	color: #15131f;
}

.f-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 6px;
	color: #8e8c85;
	font-size: 12px;
}

.f-left,
.f-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.f-effort {
	color: #cfcdc6;
	font-weight: 500;
}

.f-tps {
	color: #8e8c85;
	font-family: var(--mono);
	font-size: 11.5px;
	opacity: 0;
	transition: opacity 0.3s;
}

.f-tps.on {
	opacity: 1;
}

/* Footer of the sidebar: the connection status, support and settings */
.f-foot {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	margin: auto -10px -12px;
	padding: 0 8px 0 14px;
	border-top: 1px solid #262626;
	color: #b6b4ad;
	font-size: 12px;
	white-space: nowrap;
}

.f-dot {
	width: 7px;
	height: 7px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--a-add);
}

.f-icons {
	display: flex;
	gap: 2px;
	margin-left: auto;
}

.f-ico {
	display: flex;
	width: 26px;
	height: 26px;
	align-items: center;
	justify-content: center;
	border-radius: 7px;
	color: #8e8c85;
	transition: background-color 0.2s;
}

.f-ico svg {
	width: 15px;
	height: 15px;
	stroke-width: 1.75;
}

.f-ico.hot {
	background: #303030;
}

/* The settings view the film opens */
.f-settings {
	position: absolute;
	inset: 0;
	z-index: 12;
	display: flex;
	background: var(--a-bg);
	opacity: 0;
	pointer-events: none;
	transform: translateX(18px);
	transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.f-settings.open {
	opacity: 1;
	transform: none;
}

.fs-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 178px;
	flex-shrink: 0;
	padding: 12px 10px;
	border-right: 1px solid #242424;
	background: var(--a-side);
}

.fs-title {
	margin: 2px 8px 10px;
	font-family: var(--display);
	font-size: 15px;
	font-weight: 600;
}

.fs-item {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 32px;
	padding: 0 10px;
	border-radius: 8px;
	color: #b6b4ad;
	font-size: 13px;
	white-space: nowrap;
	transition: background-color 0.2s, color 0.2s;
}

.fs-item svg {
	width: 15px;
	height: 15px;
	opacity: 0.85;
}

.fs-item.active {
	background: #282828;
	color: #fff;
}

.fs-item.active svg {
	color: var(--accent);
	opacity: 1;
}

.fs-item.hot {
	background: #303030;
}

.fs-body {
	position: relative;
	flex: 1;
	min-width: 0;
}

.fs-pane {
	position: absolute;
	inset: 20px 26px;
	display: none;
	flex-direction: column;
	gap: 8px;
}

.fs-pane.on {
	display: flex;
}

.fs-pane h3 {
	font-family: var(--display);
	font-size: 18px;
	font-weight: 600;
}

.fs-sub {
	margin: 0 0 6px;
	color: var(--a-mut);
	font-size: 12.5px;
}

.fs-in {
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.fs-in.on {
	opacity: 1;
	transform: none;
}

.fs-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 12px;
	border: 1px solid var(--a-line);
	border-radius: 10px;
	background: var(--a-card);
}

.fs-row b {
	font-weight: 500;
}

.fs-row small {
	display: block;
	color: var(--a-mut);
	font-size: 11.5px;
}

.fs-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;
	padding: 0 10px;
	border: 1px solid var(--a-line);
	border-radius: 8px;
	background: var(--a-field);
	font-size: 12.5px;
	white-space: nowrap;
	transition: background-color 0.3s, border-color 0.3s;
}

.fs-chip i {
	color: var(--a-mut);
	font-size: 11.5px;
}

.fs-chip.hot {
	background: #333;
}

.fs-chip.changed {
	border-color: rgba(155, 138, 251, 0.6);
}

.fs-switch {
	position: relative;
	flex-shrink: 0;
	width: 32px;
	height: 18px;
	border-radius: 999px;
	background: #3a3a3a;
	transition: background-color 0.25s;
}

.fs-switch i {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #bdbab2;
	transition: transform 0.25s var(--ease), background-color 0.25s;
}

.fs-switch.on {
	background: var(--accent);
}

.fs-switch.on i {
	transform: translateX(14px);
	background: #fff;
}

.fs-status {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--a-mut);
	font-size: 12px;
}

.fs-status::before {
	content: '';
	width: 9px;
	height: 9px;
	border: 1.5px solid var(--accent);
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

.fs-status.ok {
	color: var(--a-add);
}

.fs-status.ok::before {
	border: 0;
	background: var(--a-add);
	animation: none;
}

.fs-tabs {
	display: flex;
	gap: 6px;
}

.fs-pick {
	padding: 4px 11px;
	border: 1px solid var(--a-line);
	border-radius: 999px;
	color: var(--a-mut);
	font-size: 12px;
}

.fs-pick.on {
	border-color: rgba(155, 138, 251, 0.6);
	background: rgba(155, 138, 251, 0.12);
	color: var(--a-fg);
}

.fs-results {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fs-results p {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
	padding: 7px 12px;
	border-radius: 9px;
	background: #1b1b1b;
	font-size: 12.5px;
}

.fs-results small {
	color: var(--a-mut);
	font-size: 11.5px;
}

.fs-pane .code .ln {
	padding: 0 12px;
}

/* Changes panel */
.f-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 4;
	display: flex;
	width: 330px;
	flex-direction: column;
	gap: 10px;
	padding: 12px 14px;
	border-left: 1px solid #2d2d2d;
	background: #181818;
	box-shadow: -20px 0 50px -20px rgba(0, 0, 0, 0.7);
	transform: translateX(105%);
	transition: transform 0.55s var(--ease);
}

.f-panel.open {
	transform: none;
}

.fp-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}

.fp-head b {
	font-family: var(--display);
	font-size: 15px;
	font-weight: 600;
}

.fp-head span {
	color: var(--a-mut);
	font-size: 12px;
}

.fp-actions {
	display: flex;
	gap: 6px;
}

.fp-file {
	display: flex;
	gap: 10px;
	color: var(--a-mut);
	font-family: var(--mono);
	font-size: 12px;
}

.fp-file .st {
	color: var(--a-warn);
	font-weight: 600;
}

.fp-file b {
	color: var(--a-fg);
	font-weight: 500;
}

.code {
	margin: 0;
	padding: 8px 0;
	overflow: hidden;
	border: 1px solid var(--a-line);
	border-radius: 10px;
	background: #121212;
	font-family: var(--mono);
	font-size: 11px;
	line-height: 1.8;
}

.code .ln {
	display: block;
	padding: 0 10px;
	white-space: pre;
}

.code .ln.plus { background: rgba(168, 192, 138, 0.13); color: #cfe0b8; }
.code .ln.minus { background: rgba(229, 140, 128, 0.13); color: #f0b3aa; }

.fp-box {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: auto;
	padding: 10px;
	border: 1px solid var(--a-line);
	border-radius: 11px;
	background: var(--a-card);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.fp-box.show {
	opacity: 1;
	transform: none;
}

.fp-msg {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	min-height: 36px;
	font-size: 12.5px;
}

.fp-msg svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	margin-top: 2px;
	color: var(--accent);
	fill: currentColor;
	stroke: none;
}

.fp-box .fbtn {
	align-self: flex-end;
}

/* Cursor, closing frame and toast */
.f-cursor {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 20;
	width: 20px;
	height: 20px;
	margin: -3px 0 0 -4px;
	opacity: 0;
	pointer-events: none;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
	transition: transform 0.8s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.3s;
}

.f-cursor.show {
	opacity: 1;
}

.f-cursor svg {
	width: 20px;
	height: 20px;
	stroke-width: 1;
}

.f-cursor::after {
	content: '';
	position: absolute;
	top: 1px;
	left: 3px;
	width: 22px;
	height: 22px;
	margin: -11px 0 0 -11px;
	border: 2px solid var(--accent);
	border-radius: 50%;
	opacity: 0;
}

.f-cursor.click::after {
	animation: ripple 0.45s ease-out;
}

@keyframes ripple {
	from { opacity: 0.9; transform: scale(0.3); }
	to { opacity: 0; transform: scale(1.5); }
}

.f-end {
	position: absolute;
	inset: 0;
	z-index: 30;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: rgba(22, 22, 22, 0.97);
	font-family: var(--display);
	font-size: 26px;
	font-weight: 600;
	letter-spacing: 0.01em;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.7s;
}

.f-end.show {
	opacity: 1;
}

.f-end svg {
	width: 92px;
	height: 92px;
	stroke: none;
	fill: none;
}

.toast {
	position: absolute;
	left: 50%;
	bottom: 18px;
	z-index: 25;
	max-width: 80%;
	padding: 8px 14px;
	border: 1px solid #3a3a3a;
	border-radius: 10px;
	background: #262626;
	color: var(--a-fg);
	font-size: 12.5px;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 8px);
	transition: opacity 0.25s, transform 0.25s var(--ease);
}

.toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
}

.showcase.frozen *,
.showcase.frozen *::after {
	animation-play-state: paused !important;
}

/* Caption and chapters under the window */
.film-caption {
	min-height: 52px;
	margin-top: 18px;
	color: var(--fg-2);
	font-size: 15.5px;
	line-height: 1.5;
	transition: opacity 0.35s;
}

.film-caption.swap {
	opacity: 0;
}

.film-caption b {
	display: block;
	color: var(--fg);
	font-family: var(--display);
	font-size: 17px;
	font-weight: 600;
}

.chapters {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 8px;
}

.chapter {
	position: relative;
	flex: 1;
	padding-top: 10px;
	color: var(--dim);
	font-size: 12.5px;
	transition: color 0.3s;
}

.chapter::before,
.chapter i {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.1);
}

.chapter i {
	background: var(--accent);
	transform-origin: left;
	transform: scaleX(0);
}

.chapter.active {
	color: var(--fg);
}

.chapter.done {
	color: var(--muted);
}

.chapter.done i {
	transform: scaleX(1);
}

.chapter.active i {
	animation: fill var(--len, 5s) linear forwards;
}

@keyframes fill {
	to { transform: scaleX(1); }
}

.film-toggle {
	position: relative;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	margin-top: 4px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	transition: background-color 0.2s;
}

.film-toggle:hover {
	background: rgba(255, 255, 255, 0.06);
}

.film-toggle::before {
	content: '';
	position: absolute;
	top: 8px;
	left: 10px;
	width: 2px;
	height: 10px;
	background: var(--fg-2);
	box-shadow: 6px 0 var(--fg-2);
}

.film-toggle.paused::before {
	left: 11px;
	width: 0;
	height: 0;
	background: none;
	box-shadow: none;
	border-style: solid;
	border-width: 5px 0 5px 8px;
	border-color: transparent transparent transparent var(--fg-2);
}

/* ── Sections ── */
.section {
	max-width: 1100px;
	margin: 0 auto;
	padding: 110px 24px 0;
	text-align: center;
}

.eyebrow {
	margin-bottom: 14px;
	color: var(--accent);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.section-title {
	max-width: 760px;
	margin: 0 auto;
	font-family: var(--display);
	font-size: clamp(28px, 3.6vw, 42px);
	line-height: 1.14;
	font-weight: 600;
	letter-spacing: -0.025em;
}

.steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 52px 0 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

.steps li {
	padding: 26px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: linear-gradient(180deg, #181530, #120f24);
}

.step-n {
	display: inline-flex;
	width: 30px;
	height: 30px;
	align-items: center;
	justify-content: center;
	margin-bottom: 18px;
	border: 1px solid rgba(155, 138, 251, 0.5);
	border-radius: 50%;
	color: var(--accent);
	font-size: 13px;
	font-weight: 600;
}

.steps h3,
.card h3 {
	font-family: var(--display);
	font-size: 19px;
	font-weight: 600;
}

.steps p,
.card p {
	margin-top: 8px;
	color: var(--muted);
	font-size: 15px;
	line-height: 1.6;
}

.cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin-top: 52px;
	text-align: left;
}

.card {
	padding: 26px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: linear-gradient(180deg, #181530, #120f24);
	transition: border-color 0.3s, transform 0.3s var(--ease);
}

.card:hover {
	border-color: rgba(155, 138, 251, 0.35);
	transform: translateY(-3px);
}

.card-icon {
	display: inline-flex;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	margin-bottom: 18px;
	border-radius: 11px;
	background: rgba(155, 138, 251, 0.14);
	color: var(--accent);
}

.card-icon svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.also {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 34px;
	color: var(--muted);
	font-size: 14px;
}

.also b {
	padding: 6px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--fg-2);
	font-size: 13.5px;
	font-weight: 500;
}

.trio {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
	max-width: 1000px;
	margin: 110px auto 0;
	padding: 0 24px;
}

.trio svg {
	width: 26px;
	height: 26px;
	margin-bottom: 14px;
	fill: none;
	stroke: var(--accent);
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.trio h3 {
	font-family: var(--display);
	font-size: 18px;
	font-weight: 600;
}

.trio p {
	margin-top: 4px;
	color: var(--muted);
	font-size: 15px;
}

.faq {
	max-width: 720px;
	margin: 44px auto 0;
	text-align: left;
}

.faq details {
	border-bottom: 1px solid var(--line);
}

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

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

.faq summary::after {
	content: '';
	width: 9px;
	height: 9px;
	flex-shrink: 0;
	border: solid var(--muted);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.25s var(--ease);
}

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

.faq details p {
	padding: 0 0 22px;
	color: var(--muted);
	font-size: 15.5px;
	line-height: 1.65;
}

.cta {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 130px auto 0;
	padding: 0 24px;
	text-align: center;
}

.cta h2 {
	margin-bottom: 28px;
	font-family: var(--display);
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 600;
	letter-spacing: -0.025em;
}

.fine {
	max-width: 520px;
	margin-top: 22px;
	color: var(--muted);
	font-size: 13.5px;
}

.footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	max-width: 1680px;
	margin: 110px auto 0;
	padding: 26px clamp(24px, 4vw, 64px) 40px;
	border-top: 1px solid var(--line);
	color: var(--dim);
	font-size: 13px;
}

.footer p {
	margin: 0;
}

.footer .brand {
	font-size: 16px;
}

.footer .brand-mark {
	width: 22px;
	height: 22px;
}

.sha {
	max-width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: var(--muted);
	font-family: var(--mono);
	font-size: 11.5px;
	overflow-wrap: anywhere;
	text-align: left;
	cursor: copy;
}

.sha:hover {
	color: var(--fg-2);
}

/* ── Smaller screens ── */
@media (max-width: 1080px) {
	.hero {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
		gap: 44px;
	}

	.lead {
		max-width: 540px;
	}

	.nav-links {
		display: none;
	}

	.nav {
		justify-content: space-between;
	}

	.cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.steps,
	.cards,
	.trio {
		grid-template-columns: minmax(0, 1fr);
	}

	.trio {
		margin-top: 80px;
	}

	.section {
		padding-top: 80px;
	}

	.fit {
		aspect-ratio: auto;
		height: 460px;
	}

	.app {
		position: relative;
		width: 100%;
		height: 100%;
		transform: none;
	}

	.f-side {
		display: none;
	}

	.f-panel {
		width: 82%;
	}

	.f-tps {
		display: none;
	}

	.fs-nav {
		width: 118px;
		padding: 12px 6px;
	}

	.fs-item {
		gap: 6px;
		padding: 0 6px;
		font-size: 12px;
	}

	.fs-pane {
		inset: 16px 14px;
	}

	.chapter {
		font-size: 11px;
	}

	.footer {
		margin-top: 80px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	html {
		scroll-behavior: auto;
	}
}
