/*
 * Jarvis hub page (page-jarvis.php). Loaded on that page only, and every rule is scoped to
 * .tbjh, so the SWELL header, breadcrumbs, sidebar and footer keep their own styles.
 * Colours and type follow the NIGHT STUDIO front page.
 */

.tbjh {
	--tbjh-bg: #11100e;
	--tbjh-ink: #efe9df;
	--tbjh-ink2: #d3cbbf;
	--tbjh-mute: #bbb2a5;
	--tbjh-line: #2d2924;
	--tbjh-line2: #46403a;
	--tbjh-amber: #dca560;
	--tbjh-amber-hi: #f0c486;
	--tbjh-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
	--tbjh-latin: "Helvetica Neue", "Hiragino Sans", Arial, sans-serif;
	--tbjh-min: "Hiragino Mincho ProN", "YuMincho", "Yu Mincho", "Noto Serif JP", serif;
	margin: 0 0 3em;
	border-radius: 4px;
	background: var(--tbjh-bg);
	color: var(--tbjh-ink);
	font-family: var(--tbjh-sans);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.85;
	overflow: hidden;
}

.tbjh *,
.tbjh *::before,
.tbjh *::after { box-sizing: border-box; }
.tbjh a { color: inherit; }
.tbjh img { display: block; max-width: 100%; height: auto; }
.tbjh :focus-visible { outline: 2px solid var(--tbjh-amber-hi); outline-offset: 3px; }
.tbjh h1,
.tbjh h2,
.tbjh h3,
.tbjh p,
.tbjh ul,
.tbjh ol,
.tbjh li,
.tbjh figure { margin: 0; padding: 0; border: 0; background: none; }
.tbjh ul,
.tbjh ol { list-style: none; }
.tbjh h1::before, .tbjh h1::after,
.tbjh h2::before, .tbjh h2::after,
.tbjh h3::before, .tbjh h3::after { content: none; }

/* hero */
.tbjh-hero { padding: 56px 48px 48px; }
.tbjh .tbjh-kicker { margin-bottom: 14px; color: var(--tbjh-amber); font-family: var(--tbjh-latin); font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: .24em; }
.tbjh .tbjh-title { color: var(--tbjh-ink); font-family: var(--tbjh-min); font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; line-height: 1.4; word-break: auto-phrase; overflow-wrap: anywhere; text-wrap: balance; }
.tbjh .tbjh-lede p { max-width: 34em; margin-top: 18px; color: var(--tbjh-ink2); font-family: var(--tbjh-min); font-size: 16px; line-height: 2; line-break: strict; overflow-wrap: anywhere; }
.tbjh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 32px; }
.tbjh .tbjh-btn { display: inline-flex; align-items: center; gap: .7em; min-height: 48px; padding: 0 24px; border-radius: 99px; background: var(--tbjh-amber); color: var(--tbjh-bg); font-size: 15px; font-weight: 600; letter-spacing: .06em; text-decoration: none; transition: background-color .2s; }
.tbjh .tbjh-btn:hover { background: var(--tbjh-amber-hi); }
.tbjh .tbjh-btn:focus-visible { outline-offset: 4px; }
.tbjh .tbjh-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--tbjh-ink2); font-size: 14px; text-decoration: underline; text-underline-offset: 5px; }
.tbjh .tbjh-link:hover { color: var(--tbjh-amber-hi); }

/* sections */
.tbjh-sec { padding: 40px 48px 44px; border-top: 1px solid var(--tbjh-line); }
.tbjh .tbjh-h { margin-bottom: 24px; color: var(--tbjh-ink); font-family: var(--tbjh-sans); font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: .12em; }
#tbjh-order-title { scroll-margin-top: 80px; }

/* everyday uses: one column each, however many are shown */
.tbjh .tbjh-uses { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tbjh .tbjh-uses li { padding: 2px 24px 2px 0; }
.tbjh .tbjh-uses li + li { padding-left: 24px; border-left: 1px solid var(--tbjh-line); }
.tbjh .tbjh-use-title { margin-bottom: 10px; color: var(--tbjh-ink); font-family: var(--tbjh-min); font-size: 18px; font-weight: 600; line-height: 1.5; }
.tbjh .tbjh-uses p { color: var(--tbjh-ink2); font-size: 14.5px; line-height: 1.95; line-break: strict; overflow-wrap: anywhere; }

/* reading order: number | title + text | cover */
.tbjh .tbjh-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) 240px; grid-template-areas: "no body fig"; column-gap: 28px; align-items: start; padding: 28px 0; border-top: 1px solid var(--tbjh-line); }
.tbjh .tbjh-card:first-child { padding-top: 4px; border-top: 0; }
.tbjh .tbjh-card--text { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "no body"; }
.tbjh .tbjh-no { grid-area: no; padding-top: 4px; color: var(--tbjh-ink2); font-size: 13px; font-variant-numeric: tabular-nums; }
.tbjh-body { grid-area: body; }
.tbjh .tbjh-tag { color: var(--tbjh-amber); font-size: 13px; line-height: 1.6; }
.tbjh .tbjh-card-title { margin-top: 2px; font-family: var(--tbjh-min); font-size: 21px; font-weight: 600; line-height: 1.55; word-break: auto-phrase; overflow-wrap: anywhere; text-wrap: pretty; }
.tbjh .tbjh-card-title a { display: block; min-height: 44px; padding: 4px 0; color: var(--tbjh-ink); text-decoration: none; }
.tbjh .tbjh-card-title a:hover { color: var(--tbjh-amber-hi); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.tbjh .tbjh-text { margin-top: 8px; max-width: 36em; color: var(--tbjh-ink2); font-size: 15px; line-height: 2; line-break: strict; overflow-wrap: anywhere; }
.tbjh .tbjh-note { margin-top: 6px; color: var(--tbjh-mute); font-size: 13.5px; line-height: 1.8; }
.tbjh .tbjh-fig { grid-area: fig; margin-top: 6px; }
.tbjh .tbjh-fig img { width: 100%; border-radius: 2px; }

.tbjh .tbjh-related { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--tbjh-line); color: var(--tbjh-ink2); font-size: 14.5px; line-height: 1.9; }
.tbjh .tbjh-related a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tbjh-ink); text-decoration: underline; text-underline-offset: 5px; overflow-wrap: anywhere; }
.tbjh .tbjh-related a:hover { color: var(--tbjh-amber-hi); }

.tbjh .tbjh-empty { color: var(--tbjh-ink2); font-family: var(--tbjh-min); font-size: 16px; line-height: 2; }
.tbjh .tbjh-empty a { text-decoration: underline; text-underline-offset: 5px; }

@media (max-width: 1100px) {
	.tbjh .tbjh-card { grid-template-columns: 40px minmax(0, 1fr) 180px; column-gap: 22px; }
	.tbjh .tbjh-card--text { grid-template-columns: 40px minmax(0, 1fr); }
}

/* one column */
@media (max-width: 860px) {
	.tbjh-hero { padding: 36px 20px 32px; }
	.tbjh .tbjh-lede p { margin-top: 14px; font-size: 15px; line-height: 1.95; }
	.tbjh-actions { margin-top: 24px; gap: 4px 20px; }
	.tbjh .tbjh-btn { min-height: 44px; padding: 0 20px; font-size: 14px; }
	.tbjh-sec { padding: 28px 20px 32px; }
	.tbjh .tbjh-h { margin-bottom: 18px; }

	.tbjh .tbjh-uses { grid-auto-flow: row; grid-auto-columns: auto; }
	.tbjh .tbjh-uses li { padding: 0; }
	.tbjh .tbjh-uses li + li { margin-top: 20px; padding: 20px 0 0; border-top: 1px solid var(--tbjh-line); border-left: 0; }
	.tbjh .tbjh-use-title { margin-bottom: 6px; font-size: 17px; }
	.tbjh .tbjh-uses p { font-size: 14px; line-height: 1.9; }

	.tbjh .tbjh-card,
	.tbjh .tbjh-card--text { grid-template-columns: minmax(0, 1fr); grid-template-areas: "no" "body" "fig"; padding: 22px 0 24px; }
	.tbjh .tbjh-card:first-child { padding-top: 0; }
	.tbjh .tbjh-no { padding-top: 0; }
	.tbjh .tbjh-card-title { font-size: 18px; line-height: 1.6; }
	.tbjh .tbjh-text { max-width: none; font-size: 14px; line-height: 1.9; }
	.tbjh .tbjh-fig { margin-top: 16px; }
	.tbjh .tbjh-related { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.tbjh *,
	.tbjh *::before,
	.tbjh *::after { transition: none !important; animation: none !important; }
}
