/* Member pages (/members/<name>/). Tokens are the directory plugin's own, which come
   from the site's NectarBlocks globals, so a card and its page read as one thing. */

.hcm {
	--hcm-indigo: #303390;
	--hcm-blue: #216fb1;
	--hcm-coral: #fd7c6e;
	--hcm-ice: #caf7fd;
	--hcm-white: #ffffff;
	--hcm-ink: #000000;
	--hcm-muted: #555555;
	--hcm-border: #e5e7eb;
	--hcm-surface: #f9fafb;
	--hcm-tag-bg: rgba(48, 51, 144, 0.08);
	--hcm-font-body: 'Inter', sans-serif;
	--hcm-font-display: 'Satoshi Black', 'Satoshi', 'Inter', sans-serif;
	--hcm-font-head: 'Satoshi Medium', 'Satoshi', 'Inter', sans-serif;
	--hcm-font-mono: 'DM Mono', monospace;
	--hcm-radius: 8px;
	--hcm-radius-sm: 4px;
	--hcm-pill: 999px;
	--hcm-shadow: 0 1px 4px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .05);
	--hcm-wrap: 1120px;

	font-family: var(--hcm-font-body);
	color: var(--hcm-ink);
	background: var(--hcm-white);
	padding-bottom: 72px;
}
.hcm *, .hcm *::before, .hcm *::after { box-sizing: border-box; }
.hcm a { color: var(--hcm-blue); }
.hcm a:focus-visible, .hcm button:focus-visible { outline: 3px solid var(--hcm-coral); outline-offset: 2px; border-radius: var(--hcm-radius-sm); }
.hcm-wrap { max-width: var(--hcm-wrap); margin: 0 auto; padding: 0 20px; }

/* Band: the cover photo, or the directory card's own gradient. */
.hcm-band {
	position: relative;
	height: clamp(180px, 30vw, 360px);
	background: linear-gradient(135deg, var(--hcm-indigo) 0%, var(--hcm-blue) 100%);
	overflow: hidden;
}
.hcm-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hcm-band .hcm-wrap { position: relative; height: 100%; }
.hcm-back {
	position: absolute; top: 18px; left: 20px;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 14px; border-radius: var(--hcm-pill);
	background: rgba(255, 255, 255, .92); color: var(--hcm-indigo) !important;
	font-size: .875rem; font-weight: 600; text-decoration: none;
}
.hcm-back:hover { background: var(--hcm-white); }
.hcm-back.hcm-edit { left: auto; right: 20px; }

/* Who they are. The mark overlaps the band, like the card's avatar does. */
.hcm-id { display: grid; grid-template-columns: auto 1fr; gap: 8px 28px; align-items: end; margin-top: -64px; position: relative; }
.hcm-mark {
	width: 148px; height: 148px; border-radius: 50%;
	border: 5px solid var(--hcm-white); background: var(--hcm-white);
	box-shadow: var(--hcm-shadow);
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hcm-mark img { width: 82%; height: 82%; object-fit: contain; }
.hcm-mark--dark { background: var(--hcm-indigo); }
.hcm-mark--initial { background: var(--hcm-indigo); color: var(--hcm-white); font-family: var(--hcm-font-display); font-size: 3.6rem; line-height: 1; }
.hcm-name { padding-bottom: 6px; min-width: 0; }
.hcm h1.hcm-title {
	font-family: var(--hcm-font-display); font-weight: 400;
	font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.05; letter-spacing: -0.01em;
	color: var(--hcm-indigo); margin: 0; overflow-wrap: anywhere;
}
/* The site's hand-drawn coral underline, the one under "business." on the home page. */
.hcm-swoosh { display: block; width: min(260px, 70%); height: 16px; margin-top: 4px; }
.hcm-swoosh path { stroke: var(--hcm-coral); }
.hcm-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.hcm-tag { background: var(--hcm-tag-bg); color: var(--hcm-indigo); font-size: .8125rem; font-weight: 600; padding: 4px 10px; border-radius: var(--hcm-radius-sm); }
.hcm-since { font-family: var(--hcm-font-mono); font-size: .8125rem; color: var(--hcm-indigo); background: var(--hcm-tag-bg); padding: 4px 10px; border-radius: var(--hcm-radius-sm); }

/* The three things people come for. */
.hcm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.hcm-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 22px; border-radius: var(--hcm-pill);
	font-weight: 600; font-size: 1rem; text-decoration: none; line-height: 1.2;
	border: 2px solid var(--hcm-indigo); color: var(--hcm-indigo) !important; background: var(--hcm-white);
}
.hcm-btn--primary { background: var(--hcm-indigo); color: var(--hcm-white) !important; }
.hcm-btn:hover { background: var(--hcm-blue); border-color: var(--hcm-blue); color: var(--hcm-white) !important; }
.hcm-btn svg { width: 18px; height: 18px; flex: none; }

/* Only the member (or staff) sees this. */
.hcm-improve { margin-top: 56px; background: var(--hcm-surface); border: 1px solid var(--hcm-border); border-radius: var(--hcm-radius); padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: center; }
.hcm-improve h2 { font-family: var(--hcm-font-head); font-weight: 400; font-size: 1.0625rem; margin: 0 0 4px; color: var(--hcm-indigo); }
.hcm-improve p { margin: 0; font-size: .875rem; color: var(--hcm-muted); }
.hcm-improve .hcm-btn { padding: 8px 16px; font-size: .875rem; }
.hcm-meter { height: 8px; background: rgba(48, 51, 144, .15); border-radius: var(--hcm-pill); margin: 12px 0 10px; overflow: hidden; }
.hcm-meter span { display: block; height: 100%; background: var(--hcm-indigo); border-radius: var(--hcm-pill); }
.hcm-todo { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .875rem; }
.hcm-todo li::before { content: "+ "; color: var(--hcm-coral); font-weight: 700; }

/* Body. */
.hcm-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; margin-top: 48px; align-items: start; }
.hcm h2.hcm-h { font-family: var(--hcm-font-head); font-weight: 400; font-size: 1.5rem; color: var(--hcm-indigo); margin: 0 0 14px; }
.hcm-section + .hcm-section { margin-top: 44px; }
.hcm-about { font-size: 1.0625rem; line-height: 1.65; }
.hcm-about p { margin: 0 0 1em; }
.hcm-perk { background: var(--hcm-white); border: 2px dashed var(--hcm-coral); border-radius: var(--hcm-radius); padding: 20px 24px; }
.hcm-perk h2.hcm-h { color: var(--hcm-indigo); font-family: var(--hcm-font-body); font-weight: 700; font-size: .8125rem; margin-bottom: 8px; }
.hcm-perk p { margin: 0; font-family: var(--hcm-font-head); font-size: 1.25rem; line-height: 1.4; color: var(--hcm-indigo); }

/* Track record: the years are data, so they're mono. */
.hcm-record h3 { font-family: var(--hcm-font-body); font-size: .8125rem; font-weight: 600; color: var(--hcm-muted); margin: 0 0 8px; }
.hcm-record h3:not(:first-of-type) { margin-top: 24px; }
.hcm-record ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid rgba(48, 51, 144, .18); }
.hcm-record li { display: grid; grid-template-columns: 3.5rem 1fr; gap: 12px; padding: 8px 0 8px 16px; position: relative; }
.hcm-record li::before { content: ""; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--hcm-white); border: 2px solid var(--hcm-indigo); }
.hcm-record .hcm-award::before { border-color: var(--hcm-coral); background: var(--hcm-coral); }
.hcm-year { font-family: var(--hcm-font-mono); color: var(--hcm-indigo); font-size: .9375rem; padding-top: 1px; }
.hcm-what { font-weight: 600; }
.hcm-what small { display: block; font-weight: 400; color: var(--hcm-muted); font-size: .875rem; margin-top: 2px; }

/* Nothing but contact details yet: the card sits on its own, not beside an empty column. */
.hcm-body--solo { grid-template-columns: minmax(0, 420px); }

/* Contact. */
.hcm-card { background: var(--hcm-white); border: 1px solid var(--hcm-border); border-radius: var(--hcm-radius); box-shadow: var(--hcm-shadow); padding: 8px 22px; }
.hcm-card dl { margin: 0; }
.hcm-card .hcm-row { padding: 14px 0; border-bottom: 1px solid var(--hcm-border); }
.hcm-card .hcm-row:last-child { border-bottom: 0; }
.hcm-card dt { font-size: .75rem; font-weight: 600; color: var(--hcm-muted); margin: 0 0 3px; }
.hcm-card dd { margin: 0; overflow-wrap: anywhere; }
.hcm-card dd a { text-decoration: none; }
.hcm-card dd a:hover { text-decoration: underline; }
.hcm-social { display: flex; gap: 14px; }

/* Neighbours in the directory. */
.hcm-more { margin-top: 64px; padding-top: 36px; border-top: 2px solid var(--hcm-indigo); }
.hcm-more-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.hcm-more ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hcm-mini { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--hcm-radius); box-shadow: var(--hcm-shadow); background: var(--hcm-white); text-decoration: none; color: var(--hcm-ink) !important; height: 100%; }
.hcm-mini:hover { box-shadow: 0 4px 20px rgba(48, 51, 144, .12); }
.hcm-mini .hcm-mark { width: 52px; height: 52px; border-width: 2px; box-shadow: none; flex: none; }
.hcm-mini .hcm-mark--initial { font-size: 1.4rem; }
.hcm-mini span { font-weight: 600; line-height: 1.3; }

@media (max-width: 860px) {
	.hcm-body { grid-template-columns: 1fr; gap: 36px; }
	.hcm-more ul { grid-template-columns: 1fr; }
	.hcm-improve { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.hcm-id { grid-template-columns: 1fr; margin-top: -56px; }
	.hcm-mark { width: 112px; height: 112px; }
	.hcm-mark--initial { font-size: 2.8rem; }
	.hcm-actions { display: grid; grid-template-columns: 1fr; }
	.hcm-btn { justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
	.hcm-swoosh path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hcm-draw .9s .2s ease-out forwards; }
	@keyframes hcm-draw { to { stroke-dashoffset: 0; } }
}

/* The theme styles bare lists and definition lists inside main; take them back. */
.hcm ul.hcm-actions, .hcm ul.hcm-todo, .hcm .hcm-more ul, .hcm .hcm-record ol { list-style: none; margin-left: 0; padding-left: 0; }
.hcm ul.hcm-actions > li, .hcm .hcm-more ul > li { list-style: none; margin: 0; padding: 0; }
.hcm ul.hcm-actions > li::marker, .hcm .hcm-more ul > li::marker, .hcm .hcm-record li::marker, .hcm ul.hcm-todo > li::marker { content: none; }
.hcm .hcm-record ol { padding-left: 0; margin-left: 6px; }
.hcm .hcm-card dl dd { margin: 0; padding: 0; }
