/* ============================================================
   StreamBricks — modern AI-infrastructure theme
   Self-contained stylesheet (replaces the old template CSS)
   ============================================================ */

:root {
	--bg:        #07080f;
	--bg-2:      #0b0d1a;
	--surface:   #11142a;
	--surface-2: #161a33;
	--border:    rgba(140, 150, 220, 0.16);
	--border-2:  rgba(140, 150, 220, 0.28);
	--text:      #eef0fb;
	--muted:     #a3a8c3;
	--muted-2:   #7f86a8;
	--violet:    #a78bfa;
	--indigo:    #6366f1;
	--cyan:      #22d3ee;
	--grad:      linear-gradient(100deg, #a78bfa 0%, #6366f1 45%, #22d3ee 100%);
	--grad-soft: linear-gradient(135deg, rgba(167,139,250,0.16), rgba(34,211,238,0.10));
	--radius:    18px;
	--radius-sm: 12px;
	--maxw:      1180px;
	--shadow:    0 24px 60px -20px rgba(0,0,0,0.7);
	font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

/* Ambient gradient glows in the page background */
body::before,
body::after {
	content: "";
	position: fixed;
	z-index: -1;
	border-radius: 50%;
	filter: blur(120px);
	opacity: 0.5;
	pointer-events: none;
}
body::before { top: -240px; left: -160px; width: 620px; height: 620px; background: radial-gradient(circle, rgba(99,102,241,0.55), transparent 70%); }
body::after  { top: 260px;  right: -220px; width: 560px; height: 560px; background: radial-gradient(circle, rgba(34,211,238,0.30), transparent 70%); }

a { color: var(--cyan); text-decoration: none; transition: color .18s ease; }
a:hover { color: #67e8f9; }

img, svg { max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.grad-text {
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--violet);
	padding: 7px 14px;
	border: 1px solid var(--border-2);
	border-radius: 999px;
	background: var(--grad-soft);
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-weight: 600;
	font-size: 15px;
	padding: 13px 26px;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .16s ease, box-shadow .2s ease, background .2s ease;
	white-space: nowrap;
}
.btn-primary {
	background: var(--grad);
	color: #0a0a14;
	box-shadow: 0 10px 30px -8px rgba(99,102,241,0.6);
}
.btn-primary:hover { transform: translateY(-2px); color: #0a0a14; box-shadow: 0 16px 38px -8px rgba(99,102,241,0.75); }
.btn-ghost {
	background: rgba(255,255,255,0.03);
	border-color: var(--border-2);
	color: var(--text);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--cyan); color: var(--text); }

/* ---------- Navigation ---------- */
.site-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(14px);
	background: rgba(7,8,15,0.72);
	border-bottom: 1px solid var(--border);
}
.site-nav .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 70px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; }
.brand b { font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 88px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -0.025em; font-weight: 800; margin: 22px 0 0; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 22px 0 32px; max-width: 36em; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .microcopy { margin-top: 18px; font-size: 14px; color: var(--muted-2); }

/* ---------- Generic section ---------- */
.section { padding: 76px 0; position: relative; }
.section.tight { padding: 52px 0; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; margin: 16px 0 14px; }
.section-head p { font-size: 18px; color: var(--muted); margin: 0; }

/* ---------- Pillars row ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pillar { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.pillar .ic { width: 30px; height: 30px; color: var(--cyan); margin-bottom: 12px; }
.pillar h4 { margin: 0 0 5px; font-size: 16px; font-weight: 700; }
.pillar p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------- Cards grid ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
	position: relative;
	padding: 30px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: linear-gradient(180deg, var(--surface), var(--bg-2));
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
	overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card .badge {
	width: 52px; height: 52px; border-radius: 14px;
	display: grid; place-items: center; margin-bottom: 18px;
	background: var(--grad-soft); border: 1px solid var(--border-2);
}
.card .badge svg { width: 26px; height: 26px; color: var(--cyan); }
.card h3 { font-size: 21px; font-weight: 700; margin: 0 0 10px; letter-spacing: -0.01em; }
.card p { color: var(--muted); margin: 0 0 16px; font-size: 15.5px; }
.card ul { list-style: none; padding: 0; margin: 0; }
.card ul li { position: relative; padding-left: 26px; margin-bottom: 9px; font-size: 14.5px; color: var(--muted); }
.card ul li::before {
	content: ""; position: absolute; left: 0; top: 7px; width: 15px; height: 15px;
	background: var(--grad); border-radius: 50%; opacity: .9;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
}

/* ---------- Problem / split panel ---------- */
.panel {
	border: 1px solid var(--border); border-radius: var(--radius);
	background: var(--surface); padding: 34px;
}
.flow {
	font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 14px; color: var(--muted); line-height: 2; word-spacing: 2px;
}
.flow .bad { color: #fca5a5; }
.flow .good { color: #6ee7b7; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.stat .num { font-size: clamp(34px, 4vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.stat .label { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

/* ---------- Comparison list ---------- */
.compare { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.compare .row {
	display: flex; gap: 14px; align-items: flex-start;
	padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm);
	background: var(--surface);
}
.compare .vs { font-weight: 700; color: var(--violet); white-space: nowrap; min-width: 120px; }
.compare .row p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- Comparison table ---------- */
.cmp-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 720px; }
.cmp-table th, .cmp-table td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--border); }
.cmp-table thead th { font-size: 13px; color: var(--muted); font-weight: 600; vertical-align: bottom; }
.cmp-table tbody th { font-weight: 600; color: var(--text); text-align: left; white-space: nowrap; }
.cmp-table td { color: var(--muted); }
.cmp-table td small { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.cmp-table .own { background: var(--grad-soft); }
.cmp-table thead th.own { color: var(--text); font-weight: 800; border-bottom: 2px solid var(--border-2); }
.cmp-table tbody td.own { color: var(--text); }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }
.yes { color: #6ee7b7; font-weight: 700; }
.no { color: #fca5a5; font-weight: 700; }
.partial { color: #fcd34d; font-weight: 700; }

/* ---------- Use cases ---------- */
.usecases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.usecase {
	padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-sm);
	background: var(--surface); display: flex; gap: 14px; align-items: flex-start;
	transition: border-color .2s ease, transform .2s ease;
}
.usecase:hover { border-color: var(--border-2); transform: translateY(-3px); }
.usecase svg { width: 22px; height: 22px; color: var(--cyan); flex: none; margin-top: 2px; }
.usecase h4 { margin: 0 0 3px; font-size: 16px; font-weight: 700; }
.usecase p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
	position: relative; overflow: hidden;
	border: 1px solid var(--border-2); border-radius: 26px;
	background: var(--grad-soft); padding: 56px 40px; text-align: center;
}
.cta-band h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin: 0 0 12px; letter-spacing: -0.02em; }
.cta-band p { color: var(--muted); font-size: 18px; margin: 0 0 26px; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.site-footer .brand { margin-bottom: 14px; }
.site-footer p { color: var(--muted); font-size: 15px; max-width: 34em; }
.footer-col h5 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin: 6px 0 14px; }
.footer-col a { display: block; color: var(--muted); margin-bottom: 10px; font-size: 15px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted-2); font-size: 14px; }

/* ---------- Contact form ---------- */
.contact-form { max-width: 560px; margin: 0 auto; }
.contact-form .fields { display: grid; gap: 16px; }
.contact-form label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 7px; }
.contact-form input, .contact-form textarea {
	width: 100%; padding: 13px 15px; font: inherit; font-size: 15px;
	color: var(--text); background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-sm); outline: none; transition: border-color .18s ease;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--cyan); }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
	border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
	background: var(--surface); display: flex; flex-direction: column;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.post-thumb { height: 168px; position: relative; display: grid; place-items: center; }
.post-thumb svg { width: 100%; height: 100%; }
.post-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.post-tag { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet); }
.post-body h3 { font-size: 19px; font-weight: 700; margin: 10px 0; line-height: 1.3; }
.post-body h3 a { color: var(--text); }
.post-body h3 a:hover { color: var(--cyan); }
.post-body p { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; flex: 1; }
.post-more { font-weight: 600; font-size: 14px; }

/* ---------- Article ---------- */
.article { max-width: 800px; margin: 0 auto; }
.article-hero { text-align: center; padding: 64px 0 34px; }
.article-hero h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; margin: 18px 0 14px; }
.article-hero p.dek { font-size: 19px; color: var(--muted); margin: 0; }
.article-banner { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin: 8px 0 44px; }
.article-banner svg { display: block; width: 100%; height: auto; }
.article h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.015em; margin: 44px 0 14px; }
.article h3 { font-size: 21px; font-weight: 700; margin: 30px 0 10px; }
.article p { color: #cdd1e6; margin: 0 0 18px; }
.article ul { color: #cdd1e6; padding-left: 0; list-style: none; margin: 0 0 18px; }
.article ul li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.article ul li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--grad); }
.article code {
	font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.88em;
	background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; color: #c4b5fd;
}
.article .codeblock {
	display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
	padding: 18px 20px; margin: 0 0 22px; font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 14px; line-height: 1.85; color: #cdd1e6; overflow-x: auto;
}
.article .codeblock .good { color: #6ee7b7; }
.article .codeblock .kw { color: #c4b5fd; }
.article .callout {
	border: 1px solid var(--border-2); border-radius: var(--radius-sm);
	background: var(--grad-soft); padding: 22px 24px; margin: 0 0 22px;
}
.article .callout p { margin: 0; color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.hero-grid { grid-template-columns: 1fr; gap: 40px; }
	.hero-visual { order: -1; }
	.pillars { grid-template-columns: repeat(2, 1fr); }
	.cards, .usecases, .post-grid { grid-template-columns: repeat(2, 1fr); }
	.stats { grid-template-columns: repeat(2, 1fr); gap: 30px; }
	.compare { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
	body { font-size: 16px; }
	.nav-links { display: none; }
	.nav-toggle { display: block; }
	.nav-links.open { display: flex; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 12px 24px; }
	.nav-links.open a { padding: 12px 0; border-bottom: 1px solid var(--border); }
	.hero { padding: 56px 0 40px; }
	.section { padding: 56px 0; }
	.cards, .usecases, .post-grid, .pillars, .split, .footer-grid { grid-template-columns: 1fr; }
	.stats { grid-template-columns: 1fr 1fr; }
	.nav-cta .btn-ghost { display: none; }
}
