/* Runbooks marketing site. Values come from the shared design system
   (design-system/tokens.css); nothing here invents a colour, size or radius. */

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	line-height: var(--leading-normal);
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
	line-height: var(--leading-tight);
	letter-spacing: -0.01em;
}

h2 {
	font-size: var(--text-2xl);
	margin: 0 0 var(--space-2);
}

h3 {
	font-size: var(--text-md);
	margin: 0 0 var(--space-2);
}

p {
	margin: 0 0 var(--space-3);
}

a {
	color: var(--link);
}

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

.wrap,
.site-header,
main,
.site-footer {
	max-width: 1080px;
	margin-inline: auto;
	padding-inline: var(--space-5);
}

/* Header */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding-block: var(--space-4);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	font-size: var(--text-md);
}

.brand-word {
	font-family: var(--font-mono);
	letter-spacing: -0.02em;
}
.brand-word span {
	color: var(--accent-strong);
}

.site-nav {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	font-size: var(--text-sm);
}
.site-nav a {
	color: var(--muted);
	text-decoration: none;
}
.site-nav a:hover {
	color: var(--text);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	padding: var(--ctrl-pad-y) var(--space-4);
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--text);
	text-decoration: none;
	background: var(--surface);
}
.btn:hover {
	border-color: var(--link);
}
.btn-primary {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--on-accent);
}
.btn-primary:hover {
	background: var(--accent-strong);
	border-color: var(--accent-strong);
}
.site-nav .btn-primary {
	color: var(--on-accent);
}

/* Hero */
.hero {
	padding-block: var(--space-7) var(--space-6);
	max-width: var(--measure);
}
.eyebrow {
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
	margin-bottom: var(--space-3);
}
.hero h1 {
	font-size: clamp(2.2rem, 6vw, var(--text-2xl));
	margin: 0 0 var(--space-4);
}
.lede {
	font-size: var(--text-md);
	color: var(--text);
}
.cta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	margin-top: var(--space-5);
}

/* Quickstart code */
.quickstart {
	background: var(--code-bg);
	border: 1px solid var(--code-border);
	border-radius: var(--radius-md);
	color: var(--code-text);
	padding: var(--space-4);
	margin-top: var(--space-5);
	overflow-x: auto;
	font-size: var(--text-xs);
	line-height: var(--leading-snug);
}
.quickstart code {
	color: var(--code-text);
}

/* Sections */
section {
	padding-block: var(--space-6);
	border-top: 1px solid var(--border);
}
.section-lede {
	max-width: var(--measure);
	color: var(--muted);
}
.empty {
	color: var(--muted);
	font-style: italic;
}

/* Trusted strip: one partner logo under the hero. The wordmark is shown as
   supplied (full colour); only its ink swaps with the theme. */
.trusted {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-4);
	padding-block: var(--space-5);
}
.trusted-label {
	margin: 0;
	color: var(--muted);
	font-size: var(--text-sm);
}
.trusted-logo {
	display: inline-flex;
	align-items: center;
}
.trusted-logo img {
	height: 30px;
	width: auto;
}
.trusted-on-light {
	display: none;
}
html[data-theme="light"] .trusted-on-dark {
	display: none;
}
html[data-theme="light"] .trusted-on-light {
	display: block;
}

/* Supporters are bracketed names, not filled pills (design-system badge rule). */
.supporters {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-4);
	color: var(--text);
	font-size: var(--text-sm);
}
.supporters li::before {
	content: "[";
	margin-right: 0.35ch;
	color: var(--muted);
}
.supporters li::after {
	content: "]";
	margin-left: 0.35ch;
	color: var(--muted);
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--space-4);
	margin-top: var(--space-5);
}
.grid + .section-lede {
	margin-top: var(--space-5);
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: var(--space-4);
}
.card p:last-child {
	margin-bottom: 0;
}
.card p {
	color: var(--muted);
	font-size: var(--text-sm);
}

.split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: var(--space-5);
}
.split p {
	color: var(--muted);
}
.callout {
	border-left: 3px solid var(--warn);
	padding-left: var(--space-3);
	color: var(--text) !important;
}

/* See it: the demo clips, one row of three and stacked on narrow screens. The
   videos autoplay muted only once on screen; the poster is the reduced-motion
   and no-JS fallback. */
.see-it .demos {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-4);
	margin-top: var(--space-5);
}
@media (min-width: 900px) {
	.see-it .demos {
		grid-template-columns: repeat(3, 1fr);
	}
}
.demo {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}
.demo-video {
	display: block;
	width: 100%;
	height: auto;
	cursor: pointer;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--code-bg);
}
.demo figcaption {
	color: var(--muted);
	font-size: var(--text-sm);
}
.demo-frame {
	position: relative;
	cursor: pointer;
}
/* Enlarge: a small button in the corner, since the inline clips are thumbnail
   sized and the terminal text is not readable at that scale. */
.demo-expand {
	position: absolute;
	top: var(--space-2);
	right: var(--space-2);
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
}
.demo-expand:hover {
	border-color: var(--link);
	color: var(--link);
}
.demo-expand svg,
.demo-lightbox-close svg {
	width: 16px;
	height: 16px;
}

/* The enlarged clip: a native dialog, up to the full reading width. */
.demo-lightbox {
	margin: auto;
	max-width: min(1200px, 92vw);
	padding: 0;
	border: none;
	background: transparent;
	overflow: visible;
}
.demo-lightbox::backdrop {
	background: rgb(0 0 0 / 0.72);
}
.demo-lightbox-video {
	display: block;
	width: 100%;
	height: auto;
	background: var(--code-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}
.demo-lightbox-close {
	position: absolute;
	top: var(--space-2);
	right: var(--space-2);
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
}
.demo-lightbox-close:hover {
	border-color: var(--link);
	color: var(--link);
}

/* Editions */
.edition .price {
	font-family: var(--font-mono);
	font-size: var(--text-sm);
	color: var(--accent-strong);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.edition-honour {
	border-color: var(--accent);
}
.edition .soon {
	margin: 0;
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
}
.licence-note {
	max-width: var(--measure);
	margin-top: var(--space-5);
	color: var(--muted);
	font-size: var(--text-sm);
}

/* Footer */
.site-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-4) var(--space-5);
	padding-block: var(--space-5) var(--space-6);
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: var(--text-sm);
}
.footer-brand {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-weight: 600;
	color: var(--text);
}
.site-footer nav {
	display: flex;
	gap: var(--space-4);
}
.site-footer nav a {
	color: var(--muted);
	text-decoration: none;
}
.site-footer nav a:hover {
	color: var(--text);
}
.colophon {
	margin: 0 0 0 auto;
	font-family: var(--font-mono);
	font-size: var(--text-xs);
}

/* FAQ: each entry is its own card, with a boxed toggle as the expand cue. */
.faq details {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}
.faq details + details {
	margin-top: var(--space-3);
}
.faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding: var(--space-4);
	font-size: var(--text-md);
	font-weight: 600;
	color: var(--text);
	cursor: pointer;
	list-style: none;
}
.faq summary::-webkit-details-marker {
	display: none;
}
.faq summary::marker {
	content: "";
}
.faq summary:hover {
	background: var(--row-hover);
	border-radius: var(--radius-lg);
}
.faq summary:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: -2px;
	border-radius: var(--radius-lg);
}
/* The toggle is drawn from two centred bars rather than a font glyph, so it
   cannot sit off-centre the way a `+` glyph's metrics can. */
.faq summary::after {
	content: "";
	flex: none;
	width: 26px;
	height: 26px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background:
		linear-gradient(var(--muted), var(--muted)) center / 12px 2px no-repeat,
		linear-gradient(var(--muted), var(--muted)) center / 2px 12px no-repeat;
}
.faq details[open] summary {
	border-bottom: 1px solid var(--border);
}
.faq details[open] summary::after {
	background: linear-gradient(var(--muted), var(--muted)) center / 12px 2px no-repeat;
}
.faq details p {
	max-width: var(--measure);
	margin: 0;
	padding: var(--space-4);
	color: var(--muted);
	font-size: var(--text-sm);
}

@media (max-width: 640px) {
	.site-nav a:not(.btn) {
		display: none;
	}
	.colophon {
		margin-left: 0;
	}
}
