/*  The Fretboard Hub: website page styles.
    Colours come from fbh-shared.css (day and night), so pages switch with the toggle.
*/

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--fbh-bg);
	color: var(--fbh-text);
	font-family: Inter, "Segoe UI", Roboto, system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

a { color: var(--fbh-accent); text-decoration: none; }
a:hover { color: var(--fbh-accent-hover); }
:focus-visible { outline: 2px solid var(--fbh-accent); outline-offset: 2px; }
img { max-width: 100%; display: block; }

h1, h2, h3 {
	font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif;
	color: var(--fbh-text);
	letter-spacing: -0.01em;
	margin: 0;
}

p { margin: 0; }

.fbh-skip {
	position: absolute; left: -9999px; top: 8px; z-index: 10;
	background: var(--fbh-accent); color: var(--fbh-on-accent);
	padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.fbh-skip:focus { left: 16px; }

/* ---------- Layout ---------- */
.fbh-container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.fbh-section { padding: 72px 0; }
.fbh-section + .fbh-section { border-top: 1px solid var(--fbh-line); }
.fbh-band { background: var(--fbh-surface-2); border-top: 1px solid var(--fbh-line); border-bottom: 1px solid var(--fbh-line); }

.fbh-eyebrow {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fbh-muted);
	margin-bottom: 12px;
}

.fbh-section-head {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
	gap: 16px; margin-bottom: 32px;
}
.fbh-section-head h2 { font-size: 38px; line-height: 1.1; }
.fbh-section-head p { margin-top: 10px; color: var(--fbh-text-soft); max-width: 620px; }

/* ---------- Buttons ---------- */
.fbh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px; border-radius: 10px;
	font-weight: 600; font-size: 16px; border: 1px solid transparent; cursor: pointer;
	font-family: inherit;
}
.fbh-btn-primary { background: var(--fbh-accent); color: var(--fbh-on-accent); }
.fbh-btn-primary:hover { background: var(--fbh-accent-hover); color: var(--fbh-on-accent); }
.fbh-btn-secondary { border-color: var(--fbh-line-2); color: var(--fbh-text); background: var(--fbh-surface); }
.fbh-btn-secondary:hover { background: var(--fbh-raised); color: var(--fbh-accent); border-color: var(--fbh-accent-line); }
.fbh-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Page heading (section pages) ---------- */
.fbh-page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--fbh-line); }
.fbh-page-head h1 { font-size: clamp(40px, 5vw, 60px); line-height: 1.04; letter-spacing: -0.02em; }
.fbh-page-head .fbh-lead { margin-top: 16px; font-size: 19px; color: var(--fbh-text-soft); max-width: 680px; }
.fbh-page-head .fbh-actions { margin-top: 28px; }

/* ---------- Homepage hero ---------- */
.fbh-hero { padding: 80px 0 72px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.fbh-hero-copy { flex: 999 1 520px; min-width: 0; }
.fbh-hero h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.02em; }
.fbh-hero .fbh-lead { margin-top: 24px; font-size: 19px; color: var(--fbh-text-soft); max-width: 560px; }
.fbh-hero .fbh-actions { margin-top: 36px; }
.fbh-hero-panel { flex: 1 1 400px; min-width: 0; }

.fbh-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px; }
.fbh-stat { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--fbh-muted); }
.fbh-stat strong { display: block; font-family: "Bricolage Grotesque", Inter, sans-serif; font-size: 28px; color: var(--fbh-text); font-weight: 700; }

/* ---------- Cards / panels ---------- */
.fbh-panel {
	background: var(--fbh-surface); border: 1px solid var(--fbh-line);
	border-radius: 14px; padding: 24px;
}
.fbh-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.fbh-panel-head h2 { font-family: Inter, sans-serif; font-size: 16px; font-weight: 600; }
.fbh-panel-head a { font-size: 14px; font-weight: 500; }

.fbh-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.fbh-grid-wide { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.fbh-card {
	display: block; background: var(--fbh-surface); border: 1px solid var(--fbh-line);
	border-radius: 12px; padding: 22px; color: var(--fbh-text);
	transition: border-color .15s ease, background-color .15s ease;
}
a.fbh-card:hover { border-color: var(--fbh-accent-line); background: var(--fbh-row-hover); color: var(--fbh-text); }
.fbh-card-kicker { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--fbh-accent); }
.fbh-card h3 { margin-top: 8px; font-family: Inter, sans-serif; font-size: 18px; font-weight: 600; line-height: 1.35; }
.fbh-card p { margin-top: 6px; font-size: 14px; color: var(--fbh-muted); line-height: 1.55; }
.fbh-card-foot { margin-top: 14px; font-size: 13px; color: var(--fbh-muted); }
.fbh-card-foot strong { color: var(--fbh-text-soft); font-weight: 600; }

.fbh-category { margin-bottom: 36px; }
.fbh-category:last-child { margin-bottom: 0; }
.fbh-category > h3 {
	font-family: Inter, sans-serif; font-size: 15px; font-weight: 600; color: var(--fbh-sage);
	margin-bottom: 14px;
}

/* Build log / post cards with picture */
.fbh-post-card { background: var(--fbh-surface); border: 1px solid var(--fbh-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; color: var(--fbh-text); }
a.fbh-post-card:hover { border-color: var(--fbh-accent-line); color: var(--fbh-text); }
a.fbh-post-card:hover h3 { color: var(--fbh-accent); }
.fbh-post-media { aspect-ratio: 16 / 10; background: var(--fbh-surface-2); border-bottom: 1px solid var(--fbh-line); display: flex; align-items: center; justify-content: center; color: var(--fbh-muted); overflow: hidden; }
.fbh-post-media img { width: 100%; height: 100%; object-fit: cover; }
.fbh-post-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.fbh-post-body h3 { font-family: Inter, sans-serif; font-size: 18px; font-weight: 600; line-height: 1.35; }
.fbh-post-body p { font-size: 14px; color: var(--fbh-text-soft); line-height: 1.55; }
.fbh-post-meta { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--fbh-muted); }
.fbh-post-meta .fbh-who { color: var(--fbh-sage); font-weight: 600; }

/* ---------- Topic lists ---------- */
.fbh-topics { list-style: none; margin: 0; padding: 0; }
.fbh-topics li + li { border-top: 1px solid var(--fbh-line); }
.fbh-topic { display: block; padding: 14px 0; color: var(--fbh-text); }
.fbh-topic:hover { color: var(--fbh-text); }
.fbh-topic:hover .fbh-topic-title { color: var(--fbh-accent); }
.fbh-topic-title { display: block; font-weight: 500; font-size: 15px; line-height: 1.4; }
.fbh-topic-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--fbh-muted); }
.fbh-tag { color: var(--fbh-sage); }

.fbh-list-panel { background: var(--fbh-surface); border: 1px solid var(--fbh-line); border-radius: 14px; padding: 4px 24px; }
.fbh-list-panel .fbh-topic { padding: 18px 0; }
.fbh-list-panel .fbh-topic-title { font-size: 17px; font-weight: 600; }
.fbh-topic-excerpt { display: block; margin-top: 6px; font-size: 14px; color: var(--fbh-text-soft); line-height: 1.55; }

/* ---------- Explore strip ---------- */
.fbh-explore .fbh-card { display: flex; flex-direction: column; min-height: 210px; }
.fbh-explore .fbh-card-latest { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--fbh-line); font-size: 13px; color: var(--fbh-muted); }
.fbh-explore .fbh-card-latest span { display: block; color: var(--fbh-text); font-weight: 500; margin-top: 2px; }
.fbh-icon-tile { width: 40px; height: 40px; border-radius: 10px; background: var(--fbh-raised); color: var(--fbh-accent); display: flex; align-items: center; justify-content: center; }

/* ---------- Steps, rules, prose ---------- */
.fbh-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.fbh-steps li { background: var(--fbh-surface); border: 1px solid var(--fbh-line); border-radius: 12px; padding: 22px; counter-increment: step; }
.fbh-steps li::before { content: "0" counter(step); display: block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--fbh-accent); margin-bottom: 8px; }
.fbh-steps strong { display: block; font-size: 17px; margin-bottom: 4px; }
.fbh-steps span { font-size: 14px; color: var(--fbh-text-soft); }

.fbh-two-col { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.fbh-two-col > .fbh-main { flex: 999 1 560px; min-width: 0; }
.fbh-two-col > .fbh-aside { flex: 1 1 300px; min-width: 0; }

.fbh-prose { max-width: 720px; font-size: 17px; color: var(--fbh-text-soft); }
.fbh-prose h2 { font-size: 28px; margin: 40px 0 12px; }
.fbh-prose h2:first-child { margin-top: 0; }
.fbh-prose p { margin: 0 0 16px; }
.fbh-prose ul, .fbh-prose ol { margin: 0 0 16px; padding-left: 22px; }
.fbh-prose li { margin-bottom: 8px; }
.fbh-prose strong { color: var(--fbh-text); }

.fbh-note { background: var(--fbh-raised); border: 1px solid var(--fbh-accent-line); border-radius: 12px; padding: 18px 20px; font-size: 15px; color: var(--fbh-text); }
.fbh-note strong { display: block; margin-bottom: 4px; }

.fbh-empty {
	background: var(--fbh-surface); border: 1px dashed var(--fbh-line-2); border-radius: 14px;
	padding: 36px 24px; text-align: center; color: var(--fbh-muted);
	display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.fbh-empty p { max-width: 520px; }

.fbh-more { margin-top: 24px; }

/* ---------- Join band ---------- */
.fbh-join {
	background: var(--fbh-raised); border: 1px solid var(--fbh-accent-line); border-radius: 18px;
	padding: 56px 48px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between;
}
.fbh-join h2 { font-size: 34px; line-height: 1.15; max-width: 640px; }
.fbh-join p { margin-top: 12px; color: var(--fbh-text-soft); max-width: 600px; }

/* ---------- Contact ---------- */
.fbh-contact-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 900px; }

/* ---------- Phones ---------- */
@media (max-width: 700px) {
	.fbh-container { padding: 0 16px; }
	.fbh-section { padding: 48px 0; }
	.fbh-hero { padding: 48px 0; gap: 36px; }
	.fbh-page-head { padding: 40px 0 28px; }
	.fbh-section-head h2 { font-size: 30px; }
	.fbh-join { padding: 32px 22px; }
	.fbh-join h2 { font-size: 26px; }
	.fbh-list-panel { padding: 4px 16px; }
}

/* ---------- Long reference pages (guidelines) ---------- */
.fbh-prose h3 { font-family: Inter, sans-serif; font-size: 17px; font-weight: 600; color: var(--fbh-text); margin: 24px 0 8px; }
.fbh-prose h2 { scroll-margin-top: 24px; }
.fbh-note ol { padding-left: 20px; }
.fbh-note li { margin-bottom: 4px; color: var(--fbh-text-soft); }
.fbh-toc { position: sticky; top: 24px; background: var(--fbh-surface); border: 1px solid var(--fbh-line); border-radius: 14px; padding: 20px 22px; }
.fbh-toc ol { list-style: none; margin: 0; padding: 0; }
.fbh-toc li + li { margin-top: 6px; }
.fbh-toc a { color: var(--fbh-text-soft); font-size: 15px; }
.fbh-toc a:hover { color: var(--fbh-accent); }
@media (max-width: 900px) { .fbh-toc { position: static; } }
.fbh-note li strong { display: inline; margin: 0; }
