/* Caramel Studio site: kit.css tokens and parts; only page layout lives here. */

@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 300 600;
	font-display: swap;
	src: url(fonts/jbm-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 300 600;
	font-display: swap;
	src: url(fonts/jbm-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* Hangul and other glyphs JetBrains Mono lacks fall through to Pretendard */
	--mono: 'JetBrains Mono', 'Pretendard Variable', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
}
/* JetBrains Mono's space is a full column wide; between Hangul words it reads as a gap */
@font-face {
	font-family: 'Pretendard Space';
	font-weight: 45 920;
	font-display: swap;
	src: url(fonts/pretendard/PretendardVariable.subset.91.woff2) format('woff2-variations');
	unicode-range: U+20;
}
:root:lang(ko) {
	--mono: 'Pretendard Space', 'JetBrains Mono', 'Pretendard Variable', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
}
:root:lang(ja) {
	--mono: 'JetBrains Mono', 'Pretendard JP Variable', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
}

a {
	color: inherit;
}
code,
kbd {
	font-family: var(--mono);
}

/* ── bar ─────────────────────────────────────────────────────────── */
.bar .brand {
	display: flex;
	align-items: center;
	gap: 9px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}
.bar .brand img {
	width: 22px;
	height: 22px;
}
.bar nav {
	display: flex;
	align-self: stretch;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.bar .readout {
	margin-left: auto;
	color: var(--muted);
	white-space: nowrap;
}

/* ── floating sheets ─────────────────────────────────────────────── */
.page {
	display: grid;
	gap: 14px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 14px;
}
.row {
	display: grid;
	gap: 14px;
	min-width: 0;
}
.row.hero {
	grid-template-columns: minmax(0, 1fr) minmax(0, 580px);
	align-items: start;
}
.col {
	display: grid;
	gap: 14px;
	align-content: start;
	min-width: 0;
}
.sheet-head .code {
	font-size: 10.5px;
	letter-spacing: 0.1em;
	color: var(--muted);
}
.sheet-body {
	padding: 4px 14px 14px;
}

/* ── hero ────────────────────────────────────────────────────────── */
.hero-copy {
	display: flex;
	flex-direction: column;
}
.hero-copy h1 {
	margin: 22px 14px 0;
	font-size: 22px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.hero-copy .kv {
	margin: 0 14px 14px;
	padding-top: 18px;
}

/* ── node graph: the app's own card grammar (node_workspace.rs, node_rows.rs) ── */
:root {
	/* pin type colours, palette.rs type_color (series hues clear of the accent) */
	--type-img: light-dark(#3b82f6, #5b9bff);
	--type-f: light-dark(#84cc16, #a3e635);
	--wire: var(--muted);
}
.graph {
	display: block;
	width: 100%;
	height: auto;
	border-top: 1px solid var(--line-soft);
	font-family: var(--mono);
}
.graph .ground { fill: var(--ground); }
.graph .dot { fill: var(--line); }
.graph .cross { fill: var(--faint); }
.graph .n-card { fill: var(--sheet); stroke: var(--line); }
.graph .n-inset { fill: var(--inset); }
.graph .n-soft { stroke: var(--line-soft); }
.graph .n-field { fill: none; stroke: var(--line); }
.graph .n-track { fill: var(--inset); stroke: var(--line); }
.graph .n-glyph { fill: none; stroke: var(--muted); }
.graph .seg-on, .graph .check, .graph .paint { fill: var(--accent); }
.graph .tick { fill: none; stroke: var(--accent-ink); stroke-width: 1.5; }
.graph .grip { fill: var(--faint); }
.graph text { font-size: 9.5px; letter-spacing: 0.04em; }
.graph .t-title { font-size: 11px; letter-spacing: 0.02em; fill: var(--text); }
.graph .t-label { fill: var(--muted); }
.graph .t-faint { fill: var(--faint); }
.graph .t-value { font-size: 10px; letter-spacing: 0; fill: var(--text); }
.graph .t-ink { fill: var(--accent-ink); }
.graph .chip rect { fill: var(--sheet); stroke: var(--line); }
.graph .chip text { fill: var(--faint); }
.graph .chip.on rect { fill: var(--accent); stroke: var(--accent); }
.graph .chip.on text { fill: var(--accent-ink); }
.graph .pin-img { fill: var(--type-img); }
.graph .pin-open { fill: var(--sheet); stroke: var(--type-img); }
.graph .pin-f { fill: var(--sheet); stroke: var(--type-f); }
.graph .wire { fill: none; stroke: var(--wire); stroke-width: 1; }
/* the artwork in the previews is content, not interface colour */
.graph .paper { fill: #f1eee2; }
.graph .stroke { fill: none; stroke-width: 9; stroke-linecap: round; }
.graph .s1 { stroke: #2b4655; }
.graph .s2 { stroke: #c4462a; }
.graph .s3 { stroke: #b3a03c; }

/* ── capability grid ─────────────────────────────────────────────── */
.ruled.caps {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.caps > li {
	padding: 12px 14px 14px;
}
.caps h3 {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.caps p {
	margin: 0;
	color: var(--muted);
	font-size: 11.5px;
}

/* ── steps on one spine ──────────────────────────────────────────── */
.spine {
	position: relative;
	margin: 0;
	padding: 0 0 0 0;
	list-style: none;
}
.spine::before {
	content: '';
	position: absolute;
	top: 11px;
	bottom: 11px;
	left: 11px;
	width: 1px;
	background: var(--line);
}
.spine li {
	position: relative;
	display: grid;
	grid-template-columns: 23px minmax(0, 1fr);
	gap: 12px;
	padding: 0 0 14px;
}
.spine li:last-child {
	padding-bottom: 0;
}
.spine .n {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 23px;
	height: 23px;
	border: 1px solid var(--line);
	background: var(--sheet);
	font-size: 10.5px;
	font-variant-numeric: tabular-nums;
	color: var(--muted);
}
.spine strong {
	display: block;
	padding-top: 3px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.spine span {
	color: var(--muted);
}
kbd {
	padding: 0 4px;
	border: 1px solid var(--line);
	font: inherit;
	font-size: 10.5px;
	color: var(--text);
}

/* ── prose sheet (privacy) ───────────────────────────────────────── */
.doc {
	max-width: 820px;
	margin: 0 auto;
	width: 100%;
}
.doc section {
	padding: 12px 14px 4px;
	border-top: 1px solid var(--line-soft);
}
.doc h2 {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}
.doc p,
.doc li {
	max-width: 72ch;
	font-size: 12px;
	line-height: 1.65;
}
.doc p {
	margin: 0 0 10px;
}
.doc ul {
	margin: 0 0 10px;
	padding-left: 16px;
}
.doc code {
	font-size: 11px;
	color: var(--muted);
	word-break: break-all;
}
.doc .table {
	margin-bottom: 12px;
}
.doc .table td {
	max-width: none;
	white-space: normal;
	height: auto;
	padding-block: 6px;
}
.doc .table th {
	white-space: nowrap;
}
:lang(ko) .doc p,
:lang(ko) .doc li {
	word-break: keep-all;
}
/* Hangul has no capitals: spaced-out captions fall apart */
:is(:lang(ko), :lang(ja)) :is(.doc h2, .sheet-head h2, .table th, .bar nav a, .foot a, .caps h3, .spine strong),
.bar nav a:is(:lang(ko), :lang(ja)),
.foot a:is(:lang(ko), :lang(ja)) {
	letter-spacing: 0.02em;
}

/* ── footer ──────────────────────────────────────────────────────── */
.foot {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	padding: 4px 2px 10px;
	color: var(--muted);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.foot a {
	text-decoration: none;
}
.foot a:hover {
	color: var(--text);
}

/* ── phone width ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.row.hero {
		grid-template-columns: minmax(0, 1fr);
	}
	.ruled.caps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 560px) {
	.page {
		padding: 14px 16px;
	}
	.bar {
		padding: 0 16px;
		gap: 10px;
	}
	.bar .readout {
		display: none;
	}
	.bar nav {
		margin-left: auto;
	}
	.bar nav a {
		padding: 0 6px;
	}
	.ruled.caps {
		grid-template-columns: minmax(0, 1fr);
	}
	.hero-copy h1 {
		font-size: 18px;
	}
	.hero-copy .kv {
		grid-template-columns: auto 1fr;
	}
}
