/* Gloss landing page. Tokens, type and controls mirror ui/src/app.css so the
   page looks like the app; the demo frame reuses the app's component styling. */

:root {
	--font: 'IBM Plex Sans', system-ui, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, monospace;
	--bg: #f7f6f3;
	--surface: #efede8;
	--surface-2: #e6e3dc;
	--text: #26241f;
	--text-2: #5f5b53;
	--text-3: #8e897f;
	--line: #dedbd3;
	--accent: #b4573a;
	--accent-text: #9a4328;
	--accent-tint: #f3e2da;
	--on-accent: #fff;
	--shadow: 0 4px 16px rgba(40, 30, 20, 0.12);
}

[data-mode='dark'] {
	color-scheme: dark;
	--bg: #1f1e1b;
	--surface: #2a2825;
	--surface-2: #34312d;
	--text: #ebe8e1;
	--text-2: #b3ada2;
	--text-3: #7f796f;
	--line: #3a3733;
	--accent: #d4785a;
	--accent-text: #e39a80;
	--accent-tint: #4a3128;
	--on-accent: #1f1e1b;
	--shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	text-wrap: pretty;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--accent-text);
	text-underline-offset: 3px;
}
a:hover {
	color: var(--accent);
}

::selection {
	background: var(--accent-tint);
}

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

button,
input,
textarea {
	font-family: inherit;
	color: inherit;
}

h1,
h2,
h3,
h4,
p {
	margin: 0;
}

.wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 clamp(20px, 5vw, 56px);
}

.eyebrow {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent-text);
}

.h2 {
	font-size: clamp(26px, 3.2vw, 34px);
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin-top: 12px;
}

.lead {
	font-size: 17px;
	line-height: 1.6;
	color: var(--text-2);
}
.lead.small {
	font-size: 16px;
}

.mono {
	font-family: var(--mono);
	font-size: 0.92em;
}

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

/* Controls */
.ibtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	font: 500 14px var(--font);
	color: var(--text);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 9px 16px;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}
.ibtn:hover {
	background: var(--surface);
	color: var(--text);
}
.ibtn:active {
	background: var(--surface-2);
}
.ibtn-primary {
	background: var(--accent);
	color: var(--on-accent);
	border-color: var(--accent);
}
.ibtn-primary:hover {
	filter: brightness(0.94);
	background: var(--accent);
	color: var(--on-accent);
}
.ibtn-ghost {
	border-color: transparent;
	color: var(--accent-text);
}
.ibtn-ghost:hover {
	background: var(--accent-tint);
	color: var(--accent-text);
}
.ibtn-sm {
	font-size: 13px;
	padding: 6px 12px;
}
.ibtn-pill {
	border-radius: 999px;
}
.ibtn-icon {
	width: 34px;
	height: 34px;
	padding: 0;
	color: var(--text-2);
}

.iinput {
	width: 100%;
	min-height: 36px;
	padding: 7px 10px;
	font: inherit;
	font-size: 14px;
	color: var(--text);
	caret-color: var(--accent);
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 8px;
}
.iinput::placeholder {
	color: var(--text-3);
}
.iinput:focus-visible {
	border-color: var(--accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--accent-tint);
}

.bare {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-align: left;
}
.linkbtn {
	color: var(--accent-text);
	font-size: 13px;
}
.linkbtn:hover {
	color: var(--accent);
}

/* Split download button: the left half downloads, the right half opens the
   platform picker. */
.split {
	display: inline-flex;
}
.split .ibtn-primary:first-child {
	border-radius: 999px 0 0 999px;
	padding: 11px 18px 11px 20px;
	font-size: 15px;
}
.split .ibtn-primary:last-child {
	border-radius: 0 999px 999px 0;
	padding: 11px 14px 11px 10px;
	border-left: 1px solid color-mix(in srgb, var(--on-accent) 30%, transparent);
}

/* Nav */
.nav {
	position: sticky;
	top: 0;
	z-index: 30;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.nav .wrap {
	display: flex;
	align-items: center;
	gap: 22px;
	height: 58px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	margin-right: auto;
}
.brand:hover {
	color: var(--text);
}
.gmark {
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: var(--text);
	color: var(--bg);
	display: grid;
	place-items: center;
	font: 600 13px var(--font);
	flex: none;
}
.navlinks {
	display: flex;
	gap: 22px;
	font-size: 14px;
}
.navlinks a {
	color: var(--text-2);
	text-decoration: none;
}
.navlinks a:hover {
	color: var(--text);
}
/* Developer link: quiet by default, readable on hover. */
.nav .dev {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 13px;
	color: var(--text-3);
	text-decoration: none;
	white-space: nowrap;
}
.nav .dev:hover {
	color: var(--text);
}
[data-mode='dark'] .icon-moon,
:root:not([data-mode='dark']) .icon-sun {
	display: none;
}

/* Hero */
.hero {
	padding: clamp(56px, 8vw, 96px) 0 40px;
}
.two {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: clamp(28px, 5vw, 64px);
	align-items: center;
}
.hero h1 {
	font-size: clamp(38px, 5.4vw, 60px);
	line-height: 1.08;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin-top: 14px;
}
.hero h1 .accent {
	color: var(--accent-text);
}
.hero .lead {
	margin-top: 22px;
	max-width: 52ch;
}
.actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 28px;
}
.meta {
	font-size: 13px;
	color: var(--text-3);
	margin-top: 14px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}
.footnote {
	font-size: 14px;
	color: var(--text-2);
	margin-top: 20px;
}
.aside {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.aside .well {
	font-size: 14px;
}
.wbody {
	padding: 4px 14px 14px;
	color: var(--text-2);
	line-height: 1.6;
}
.stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}
.stat {
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 14px;
}
.stat b {
	display: block;
	font: 600 22px var(--font);
	letter-spacing: -0.02em;
}
.stat span {
	font-size: 12.5px;
	color: var(--text-2);
}

/* Wells and marks, as in the app */
.well {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 10px;
	font-size: 13px;
	overflow: hidden;
}
.well .well {
	background: var(--bg);
}
.whead {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent-text);
}
.whead .re {
	flex: 1;
	min-width: 0;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--text-2);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.whead .n {
	flex: none;
}
.whead .turns {
	flex: none;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--text-3);
}
.whead .chev {
	flex: none;
	transition: transform 0.15s;
}
.whead .chev.open {
	transform: rotate(180deg);
}
.wq,
.wa {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding-top: 3px;
}
.wq {
	color: var(--text-3);
}
.wa {
	color: var(--accent-text);
}
.dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
	flex: none;
}
.pulse {
	display: flex;
	gap: 4px;
	padding: 6px 0;
}
.pulse span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
	animation: gpulse 1s infinite;
}
.pulse span:nth-child(2) {
	animation-delay: 0.2s;
}
.pulse span:nth-child(3) {
	animation-delay: 0.4s;
}
@keyframes gpulse {
	0%,
	100% {
		opacity: 0.25;
	}
	50% {
		opacity: 1;
	}
}
mark.mark {
	background: var(--accent-tint);
	color: inherit;
	padding: 1px 3px;
	border-radius: 3px;
	border-bottom: 1.5px solid var(--accent);
	cursor: pointer;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}
.code {
	font-family: var(--mono);
	font-size: 0.88em;
	background: var(--surface-2);
	padding: 1px 5px;
	border-radius: 4px;
}

/* Demo section */
.demo {
	padding: 24px 0 72px;
}
.demo-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.demo-head .note {
	font-size: 13px;
	color: var(--text-3);
}
.frame {
	display: flex;
	height: 620px;
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--bg);
	box-shadow: var(--shadow);
}

/* Demo rail */
.rail {
	width: 224px;
	flex: none;
	background: var(--surface);
	border-right: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	padding: 12px 10px;
	gap: 10px;
}
.rail .newchat {
	width: 100%;
	justify-content: flex-start;
	background: var(--bg);
}
.rail .search {
	min-height: 30px;
	font-size: 12.5px;
	padding: 4px 10px;
}
.rail .list {
	flex: 1;
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.glabel {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-3);
	padding: 10px 10px 4px;
}
.glabel + .glabel,
.navitem + .glabel {
	padding-top: 12px;
}
.navitem {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 7px 10px;
	border-radius: 8px;
	font-size: 13px;
	color: var(--text-2);
	line-height: 1.3;
}
.navitem:hover {
	background: var(--surface-2);
	color: var(--text);
}
.navitem[aria-current='page'] {
	background: var(--surface-2);
	color: var(--text);
	font-weight: 500;
}
.navitem .title {
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.countpill {
	font-size: 10.5px;
	color: var(--accent-text);
	background: var(--accent-tint);
	padding: 1px 6px;
	border-radius: 999px;
}
.navsub {
	font-size: 12px;
	padding-left: 22px;
}
.navsub.nested {
	padding-left: 34px;
}
.navsub .dot {
	width: 5px;
	height: 5px;
}
.rail .foot {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 4px 0 6px;
	font-size: 12.5px;
	color: var(--text-2);
	border-top: 1px solid var(--line);
}
.rail .foot .gmark {
	width: 24px;
	height: 24px;
	border-radius: 7px;
	font-size: 12px;
}
.rail .foot .app {
	font-weight: 600;
	color: var(--text);
	font-size: 13px;
	line-height: 1.2;
}
.rail .foot .via {
	font-size: 11px;
	color: var(--text-3);
	line-height: 1.2;
}

/* Demo conversation column */
.conv {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.conv-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px 12px 24px;
	border-bottom: 1px solid var(--line);
}
.conv-head .title {
	font-weight: 600;
	font-size: 14px;
	margin-right: auto;
}
.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--surface);
	white-space: nowrap;
}
.pill .cmd {
	color: var(--text-3);
	font-size: 11px;
}
.pill.count {
	color: var(--text-2);
	padding: 3px 9px;
}
.scroll {
	flex: 1;
	overflow: auto;
	position: relative;
	padding: 20px 28px 28px;
	font-size: 15px;
}
.bubble-row {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 24px;
}
.bubble {
	max-width: 78%;
	background: var(--surface);
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.5;
	border-radius: 14px 14px 4px 14px;
}
.blk-h {
	font-size: 17px;
	font-weight: 600;
	margin: 22px 0 8px;
	line-height: 1.3;
}
.blk {
	display: flex;
	margin-bottom: 10px;
	line-height: 1.6;
}
.blk .bullet {
	flex: none;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--text-2);
	margin: 10px 13px 0 8px;
}
.blk .num {
	flex: none;
	width: 22px;
	font-size: 13px;
	color: var(--text-2);
	padding-top: 2px;
}
.blk .body {
	flex: 1;
	min-width: 0;
}
.thread {
	margin: 8px 0 20px 28px;
}
.thread .thread {
	margin: 6px 0 12px 16px;
}
.turn {
	border-top: 1px solid var(--line);
	padding: 9px 12px;
	display: grid;
	grid-template-columns: 40px 1fr;
	gap: 4px 10px;
}
.turn .q {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
}
.turn .a {
	min-width: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--text-2);
}
.turn .a .rblk {
	margin-bottom: 6px;
}
.thread .thread .turn {
	padding: 8px 12px;
}
.thread .thread .q,
.thread .thread .a {
	font-size: 12.5px;
}
.thread .thread .a .rblk {
	margin-bottom: 5px;
}
.composer {
	padding: 0 12px 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.composer textarea {
	min-height: 52px;
	font-size: 13px;
	resize: none;
}
.thread .composer textarea {
	min-height: 48px;
}
.composer .row {
	display: flex;
	gap: 8px;
}
.follow {
	border-top: 1px solid var(--line);
	padding: 6px 12px 8px 62px;
	display: flex;
	gap: 8px;
}
.follow .iinput {
	min-height: 28px;
	font-size: 12px;
	padding: 3px 9px;
}
.follow .ibtn {
	padding: 3px 8px;
	font-size: 12px;
}
.askbtn {
	position: absolute;
	transform: translateX(-50%);
	box-shadow: var(--shadow);
	z-index: 5;
	border-radius: 999px;
}
.send-row {
	padding: 8px 16px 14px;
	display: flex;
	gap: 8px;
	align-items: flex-end;
}
.send-row textarea {
	border-radius: 18px;
	padding: 8px 14px;
	resize: none;
	min-height: 36px;
	max-height: 160px;
	line-height: 1.45;
}
.send-row .ibtn {
	border-radius: 999px;
	height: 36px;
}

/* Sections */
.section {
	padding: 56px 0 72px;
	border-top: 1px solid var(--line);
}
.grid3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	margin-top: 36px;
}
.grid3.feats {
	gap: 16px;
	margin-top: 48px;
}
.step {
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: 16px;
	align-items: start;
}
.stepn {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--accent-tint);
	color: var(--accent-text);
	display: grid;
	place-items: center;
	font: 600 16px var(--mono);
}
.step h3 {
	font-size: 17px;
	font-weight: 600;
	margin-bottom: 6px;
}
.step p {
	font-size: 14.5px;
	color: var(--text-2);
	line-height: 1.55;
}
.feat {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--surface);
}
.feat h3 {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
}
.feat p {
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--text-2);
}

/* Agents table */
.table {
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	margin-top: 28px;
	background: var(--surface);
}
.agentrow {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
	gap: 12px;
	align-items: center;
	padding: 14px 18px;
	border-top: 1px solid var(--line);
	font-size: 14px;
	background: var(--bg);
}
.agentrow:first-child {
	border-top: 0;
	background: transparent;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-3);
}
.agentrow .name {
	font-weight: 600;
}
.agentrow .v {
	color: var(--text-2);
}
.tablenote {
	font-size: 13px;
	color: var(--text-3);
	margin-top: 14px;
}

/* Download section */
.dl .two {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	align-items: start;
}
.dl .actions {
	margin-top: 22px;
}
.dl .version {
	font-size: 13px;
	color: var(--text-3);
	margin-top: 14px;
}
.assets {
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--surface);
}
.asset {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
	border-top: 1px solid var(--line);
	font-size: 13.5px;
	background: var(--bg);
}
.asset:first-child {
	border-top: 0;
}
.asset.rec {
	background: var(--accent-tint);
}
.asset .info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 2px;
	line-height: 1.3;
}
.asset .top {
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.asset .arch {
	font-weight: 400;
	font-size: 12px;
	color: var(--text-3);
}
.asset .recl {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--accent-text);
}
.asset .fmt {
	font-size: 12.5px;
	color: var(--text-2);
}
.asset .ibtn {
	flex: none;
}
.assets .status {
	padding: 22px 14px;
	font-size: 13.5px;
	color: var(--text-2);
	background: var(--bg);
}
.assets .status.loading {
	color: var(--text-3);
}
.assets .osnote {
	padding: 10px 14px;
	font-size: 12.5px;
	color: var(--text-3);
	border-top: 1px solid var(--line);
}

/* Footer */
.footer {
	padding: 36px 0 48px;
	border-top: 1px solid var(--line);
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	font-size: 13px;
	color: var(--text-3);
}
.footer .links {
	margin-left: auto;
	display: flex;
	gap: 18px;
}

/* Downloads modal */
.modal {
	position: fixed;
	inset: 0;
	background: rgba(20, 16, 12, 0.45);
	z-index: 50;
	display: grid;
	place-items: center;
	padding: 20px;
}
.modal[hidden] {
	display: none;
}
.dialog {
	width: 640px;
	max-width: 100%;
	max-height: 100%;
	overflow: auto;
	background: var(--bg);
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: var(--shadow);
}
.dialog .head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--line);
}
.dialog .head .t {
	flex: 1;
}
.dialog .head .t b {
	display: block;
	font-weight: 600;
	font-size: 17px;
}
.dialog .head .t span {
	font-size: 13px;
	color: var(--text-2);
}
.dialog .close {
	color: var(--text-3);
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	border-radius: 6px;
}
.dialog .close:hover {
	background: var(--surface);
	color: var(--text);
}
.dialog .rows {
	background: var(--surface);
}
.dlrow {
	display: grid;
	grid-template-columns: minmax(84px, 0.9fr) minmax(120px, 1.4fr) auto auto auto;
	gap: 12px;
	align-items: center;
	padding: 10px 14px;
	border-top: 1px solid var(--line);
	font-size: 13.5px;
	background: var(--bg);
}
.dlrow:first-child {
	border-top: 0;
	background: transparent;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-3);
}
.dlrow.rec {
	background: var(--accent-tint);
}
.dlrow .os {
	font-weight: 500;
}
.dlrow .v {
	color: var(--text-2);
}
.dlrow .size {
	color: var(--text-3);
}
.dialog .status {
	padding: 22px 14px;
	font-size: 13.5px;
	color: var(--text-2);
	background: var(--bg);
}
.dialog .foot {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 12px 20px;
	font-size: 12.5px;
	color: var(--text-3);
	border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
	.frame {
		height: auto;
	}
	.rail {
		display: none;
	}
	.scroll {
		max-height: 620px;
	}
	.grid3,
	.two,
	.dl .two {
		grid-template-columns: minmax(0, 1fr);
	}
	.agentrow {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 4px;
	}
	.agentrow span:nth-child(n + 4) {
		font-size: 12.5px;
		color: var(--text-3);
	}
	.agentrow:first-child span:nth-child(n + 4) {
		display: none;
	}
}

@media (max-width: 640px) {
	.navlinks {
		display: none;
	}
	.dlrow {
		grid-template-columns: 1fr auto;
	}
	.dlrow span:nth-child(2),
	.dlrow span:nth-child(3),
	.dlrow span:nth-child(4) {
		display: none;
	}
	.stats {
		grid-template-columns: minmax(0, 1fr);
	}
}
