/* git.cryptorugmunch.com — page styles.
   Tokens, 68px bar and the four-column footer come from the shared corporate
   chrome (brand/theme/tokens.css, chrome-bar.css, chrome-footer.css — copied
   from fleet-infra/radicle/theme/). This file only styles the page body. */

@font-face {
	font-family: Inter;
	src: url("/brand/fonts/inter-latin-var.woff2") format("woff2-variations");
	font-weight: 100 900;
	font-display: swap;
	font-style: normal;
}
@font-face {
	font-family: "JetBrains Mono";
	src: url("/brand/fonts/jetbrains-mono-latin-var.woff2")
		format("woff2-variations");
	font-weight: 100 800;
	font-display: swap;
	font-style: normal;
}
@font-face {
	font-family: "Space Grotesk";
	src: url("/brand/fonts/space-grotesk-latin.woff2") format("woff2");
	font-weight: 300 700;
	font-display: swap;
	font-style: normal;
}

:root {
	--bg-deepest: #030303;
	--bg-card: #0a0a0a;
	--bg-elevated: #0c0c0c;
	--border: #1e1e1e;
	--border-strong: #2c2c2c;
	--text-primary: #f4f4f6;
	--text-secondary: #a8a8b0;
	--text-tertiary: #9a9aa3;
	--accent: #00ff88;
	--amber: #ffaa00;
	--red: #ff8fa3;
	--font-display: "Space Grotesk", Inter, system-ui, sans-serif;
	--font-body: Inter, system-ui, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;
	--text-sm: 0.875rem;
	--text-lead: 1.125rem;
	--text-h3: 1.25rem;
	--text-h2: clamp(1.75rem, 3.2vw, 2.375rem);
	--text-h1: clamp(2.1rem, 5.2vw, 3.75rem);
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;
	--space-9: 96px;
	--radius: 14px;
	--wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg-deepest); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text-primary); font-family: var(--font-body); line-height: 1.65; }
img { max-width: 100%; height: auto; }
code, pre { font-family: var(--font-mono); font-size: 0.86em; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(0, 255, 136, 0.25); color: #fff; }

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

/* ── hero ───────────────────────────────────────────────── */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 64px); }
.hero__grid { display: grid; gap: clamp(28px, 4vw, 48px); align-items: start; }
.eyebrow {
	display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
	font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
	letter-spacing: 0.16em; color: var(--text-tertiary); text-transform: uppercase;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
h1 {
	margin: 0 0 20px; max-width: 18ch; font-family: var(--font-display);
	font-size: var(--text-h1); font-weight: 700; line-height: 1.06; letter-spacing: -0.03em;
}
.lede { margin: 0 0 28px; max-width: 54ch; font-size: var(--text-lead); color: var(--text-secondary); }
.lede code, .sechead__sub code, .rmm-footer__licence code {
	font-family: var(--font-mono); color: var(--text-primary); background: rgba(255,255,255,0.06);
	padding: 1px 5px; border-radius: 4px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
	font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
	letter-spacing: -0.01em; text-decoration: none; color: #fff;
	transition: background var(--rmm-dur) var(--rmm-ease), border-color var(--rmm-dur) var(--rmm-ease);
}
.btn--primary { background: var(--accent); color: #030303; font-weight: 700; }
.btn--primary:hover { background: #1aff94; }
.btn--ghost { border-color: var(--border-strong); background: var(--bg-card); color: var(--text-primary); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.strip {
	display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 32px 0 0; padding: 0; list-style: none;
	font-size: 0.8rem; color: var(--text-tertiary);
}
.strip strong { display: block; font-family: var(--font-mono); font-size: 0.95rem; color: var(--accent); }

/* ── terminal card ──────────────────────────────────────── */
.terminal { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-card); overflow: hidden; }
.terminal__bar {
	display: flex; align-items: center; gap: 10px; padding: 10px 14px;
	border-bottom: 1px solid var(--border); background: var(--bg-elevated);
}
.terminal__lights { display: inline-flex; gap: 5px; }
.terminal__lights i { width: 9px; height: 9px; border-radius: 50%; background: #2a2a2a; }
.terminal__bar h2 {
	margin: 0; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
	letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary);
}
.terminal__body { margin: 0; padding: 16px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.78rem; line-height: 1.85; color: #e6e6ea; }
.terminal__body code { font-size: inherit; }
.c-dim { color: #8f8f98; }
.c-accent { color: var(--accent); }
.terminal__foot {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	padding: 12px 14px; border-top: 1px solid var(--border); background: var(--bg-elevated);
}
.terminal__note { font-family: var(--font-mono); font-size: 0.66rem; color: #8f8f98; }

/* ── sections ───────────────────────────────────────────── */
.section { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--border); }
.section--alt { background: #060606; }
.sechead { margin-bottom: clamp(24px, 4vw, 40px); }
.sechead__index { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; color: var(--accent); }
.sechead h2 { margin: 8px 0 10px; font-family: var(--font-display); font-size: var(--text-h2); font-weight: 700; letter-spacing: -0.025em; }
.sechead__sub { margin: 0; max-width: 76ch; font-size: 0.92rem; color: var(--text-secondary); }

/* ── repo list ──────────────────────────────────────────── */
.repos { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.repo { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.repo:hover { border-color: var(--border-strong); }
.repo__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.repo__name { margin: 0; font-family: var(--font-mono); font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.repo__badge {
	padding: 2px 8px; border-radius: 999px; border: 1px solid; font-family: var(--font-mono);
	font-size: 0.64rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.repo__badge--ok { border-color: rgba(0,255,136,0.35); background: rgba(0,255,136,0.08); color: var(--accent); }
.repo__badge--bad { border-color: rgba(255,143,163,0.35); background: rgba(255,143,163,0.08); color: var(--red); }
.repo__cmd { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 8px; }
.repo__cmd code {
	flex: 1 1 auto; min-width: 0; padding: 8px 10px; border-radius: 8px;
	background: #050505; border: 1px solid var(--border); color: #e6e6ea;
	font-size: 0.75rem; overflow-wrap: anywhere;
}
.repo__cmd code .c-dim { color: #8f8f98; }
.copy {
	flex: 0 0 auto; min-height: 44px; min-width: 44px; padding: 0 12px;
	border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-elevated);
	color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.7rem;
	cursor: pointer; transition: border-color var(--rmm-dur) var(--rmm-ease), color var(--rmm-dur) var(--rmm-ease);
}
.copy:hover { border-color: var(--accent); color: var(--accent); }
.copy[data-done="1"] { border-color: var(--accent); color: var(--accent); }
.copy[data-done="0"] { border-color: var(--red); color: var(--red); }
.repo__meta {
	display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0;
	font-family: var(--font-mono); font-size: 0.68rem; color: #8f8f98;
}
.repo__meta .rid { overflow-wrap: anywhere; }
.repos__foot { margin: 24px 0 0; font-size: 0.88rem; color: var(--text-secondary); }

/* ── explain ────────────────────────────────────────────── */
.explain { display: grid; gap: 18px; }
.explain__item { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.explain__num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; margin-bottom: 12px; border-radius: 7px;
	background: rgba(0,255,136,0.1); color: var(--accent);
	font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
}
.explain h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: var(--text-h3); font-weight: 600; letter-spacing: -0.02em; }
.explain p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }
.explain code { font-family: var(--font-mono); color: var(--text-primary); }

/* ── responsive ─────────────────────────────────────────── */
@media (min-width: 760px) {
	.hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
	.repos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.explain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
	.explain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@media print {
	.rmm-bar, #rmm-footer, .terminal { display: none; }
	body { color: #000; background: #fff; }
}

/* Accessible hiding used by app.js (live region + clipboard fallback). */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Tap targets ≥44px — scoped to this vhost so the shared chrome is untouched. */
.rmm-bar .rmm-brand { min-height: 44px; }
.rmm-bar__nav a { height: 44px; }
.rmm-skip { display: inline-flex; align-items: center; min-height: 44px; }
#rmm-footer .rmm-footer__link { min-height: 44px; align-items: center; }
#rmm-footer .rmm-footer__legal a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
