/*
Theme Name: PBM Enterprises
Theme URI: https://www.pbm.net.au
Author: PBM Enterprises Pty Ltd
Description: Block theme for PBM Enterprises and its elements — PBM Safety, PBM Rigging, PBM Entertainment — plus the Event and Entertainment Safety Committee (EESC) page. Includes page layouts, self-hosted fonts and simple enquiry forms.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pbm-enterprises
*/

/* ---------- Colour schemes per element ---------- */
:root,
.pbm-scheme-home,
.pbm-scheme-eesc {
	--pbm-accent: #2E3192;
	--pbm-btn-bg: #2E3192;
	--pbm-btn-ink: #FFFFFF;
	--pbm-accent-text: #2E3192;
}
.pbm-scheme-safety {
	--pbm-accent: #FFDE00;
	--pbm-btn-bg: #FFDE00;
	--pbm-btn-ink: #0A0A0A;
	--pbm-accent-text: #0A0A0A;
}
.pbm-scheme-rigging {
	--pbm-accent: #ED1C24;
	--pbm-btn-bg: #C4141B;
	--pbm-btn-ink: #FFFFFF;
	--pbm-accent-text: #C4141B;
}
.pbm-scheme-entertainment {
	--pbm-accent: #0A0A0A;
	--pbm-btn-bg: #0A0A0A;
	--pbm-btn-ink: #FFFFFF;
	--pbm-accent-text: #0A0A0A;
}

body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
main.pbm-main { margin-block-start: 0; }
img { max-width: 100%; height: auto; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #2E3192; outline-offset: 2px; }
.screen-reader-text:focus { clip: auto !important; }

/* ---------- Sections ---------- */
.pbm-section { padding-top: 88px; padding-bottom: 88px; }
.pbm-section--tight { padding-top: 56px; padding-bottom: 56px; }
.pbm-section--flush-top { padding-top: 0; }
.pbm-band-sand { background: #F5F5F3; }
.pbm-band-ink { background: #0A0A0A; color: #FFFFFF; }
.pbm-band-ink a:where(:not(.wp-element-button)) { color: #FFFFFF; }
.pbm-band-ink .pbm-muted, .pbm-band-ink .pbm-lead { color: #B9BCC1; }
.pbm-section > * + * { margin-block-start: 28px; }

/* ---------- Type ---------- */
.pbm-eyebrow {
	font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--pbm-accent-text); margin: 0;
}
.pbm-eyebrow.has-mark { color: #0A0A0A; display: flex; align-items: center; gap: 10px; }
.pbm-eyebrow.has-mark::before {
	content: ""; width: 14px; height: 14px; background: var(--pbm-accent); flex: none;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.pbm-lead { font-size: 18px; line-height: 1.6; color: #5E636B; max-width: 640px; }
.pbm-muted { color: #5E636B; }
.pbm-small { font-size: 14px; }
.pbm-num { font-family: var(--wp--preset--font-family--archivo); font-weight: 800; font-size: 14px; color: #5E636B; margin: 0; }
.pbm-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; }
.pbm-section-head > * { margin: 0 !important; }
.pbm-section-head .pbm-muted { max-width: 440px; }

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: opacity .15s; }
.wp-block-button__link:hover { opacity: .88; }
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: transparent; color: #0A0A0A; border: 1.5px solid #0A0A0A; padding: 14px 22px;
}
.pbm-band-ink .wp-block-button.is-style-outline > .wp-block-button__link { color: #FFFFFF; border-color: #FFFFFF; }
.pbm-btn-light > .wp-block-button__link { background: #FFFFFF !important; color: #0A0A0A !important; }
.pbm-arrow-link a, a.pbm-arrow-link { font-weight: 600; text-decoration: none; }
.pbm-arrow-link a::after, a.pbm-arrow-link::after { content: " →"; }

/* ---------- Top bar + headers ---------- */
.pbm-topbar { background: #0A0A0A; color: #D6D8DB; font-size: 13px; padding-top: 10px; padding-bottom: 10px; }
.pbm-topbar a { color: #D6D8DB; text-decoration: none; }
.pbm-topbar a:hover, .pbm-topbar .is-current a { color: #FFFFFF; }
.pbm-topbar .is-current a { font-weight: 600; border-bottom: 2px solid var(--pbm-accent); padding-bottom: 2px; }
.pbm-scheme-entertainment .pbm-topbar .is-current a { border-bottom-color: #FFFFFF; }
.pbm-topbar .wp-block-navigation { gap: 20px; font-size: 13px; }
.pbm-header { border-bottom: 1px solid #E6E6E3; padding-top: 16px; padding-bottom: 16px; background: #FFFFFF; }
.pbm-header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.pbm-logo { margin: 0; line-height: 0; }
.pbm-logo img { height: 56px; width: auto; }
.pbm-logo--home img { height: 48px; }
.pbm-mainnav { font-size: 15px; font-weight: 500; gap: 28px; }
.pbm-mainnav a { text-decoration: none; }
.pbm-mainnav .pbm-nav-cta a {
	background: var(--pbm-btn-bg); color: var(--pbm-btn-ink) !important; padding: 11px 18px; border-radius: 6px; font-weight: 600;
}
.pbm-wordmark { display: flex; align-items: center; gap: 12px; margin: 0; text-decoration: none; }
.pbm-wordmark a { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.pbm-wordmark .pbm-wordmark-box {
	background: var(--pbm-accent); color: #FFFFFF; font-family: var(--wp--preset--font-family--archivo);
	font-weight: 900; font-size: 20px; letter-spacing: 1px; padding: 8px 11px; border-radius: 4px; line-height: 1;
}
.pbm-wordmark .pbm-wordmark-text { font-family: var(--wp--preset--font-family--archivo); font-weight: 800; font-size: 16px; line-height: 1.2; max-width: 220px; color: #0A0A0A; }

/* ---------- Hero ---------- */
.pbm-hero { padding-top: 72px; padding-bottom: 80px; }
.pbm-hero h1 { margin-top: 0; }
.pbm-hero .wp-block-columns { align-items: flex-end !important; gap: 48px; }
.pbm-hero .wp-block-buttons { margin-top: 8px; }

/* ---------- Cards ---------- */
.pbm-cards.wp-block-columns { gap: 20px; margin-bottom: 20px; }
.pbm-cards.wp-block-columns:last-child { margin-bottom: 0; }
.pbm-card { background: #FFFFFF; border-radius: 12px; padding: 28px; box-sizing: border-box; }
.wp-block-column > .pbm-card:only-child, .wp-block-column > .pbm-artist:only-child, .wp-block-column > .pbm-tile:only-child { height: 100%; }
.wp-block-column > .pbm-card + .pbm-card { margin-top: 20px; }
.pbm-card > * { margin-top: 0; margin-bottom: 0; }
.pbm-card > * + * { margin-top: 12px; }
.pbm-card--line { border: 1px solid #E6E6E3; }
.pbm-card h3 { margin-top: 10px; }
.pbm-card ul { padding-left: 18px; color: #3B3F45; font-size: 15px; line-height: 1.5; }
.pbm-card ul li + li { margin-top: 8px; }
.pbm-card p:not(.pbm-num):not(.pbm-eyebrow) { font-size: 15px; color: #3B3F45; }

/* Splash tiles */
.pbm-tile { border: 1px solid #E6E6E3; border-top: 6px solid var(--tile, #0A0A0A); border-radius: 12px; padding: 20px 20px 28px; box-sizing: border-box; display: flex; flex-direction: column; }
.pbm-tile > * { margin-top: 0; margin-bottom: 0; }
.pbm-tile > * + * { margin-top: 20px; }
.pbm-tile--safety { --tile: #FFDE00; }
.pbm-tile--rigging { --tile: #ED1C24; }
.pbm-tile--entertainment { --tile: #0A0A0A; }
.pbm-tile .pbm-tile-photo img { width: 100%; height: 190px; object-fit: cover; border-radius: 8px; display: block; }
.pbm-tile .pbm-tile-logo img { max-width: 300px; width: 100%; height: auto; }
.pbm-tile .pbm-arrow-link { margin-top: auto; padding-top: 16px; }
.pbm-tile p:not(.pbm-arrow-link) { color: #5E636B; }

/* ---------- Photos ---------- */
.pbm-photo { margin: 0; }
.pbm-photo img { width: 100%; height: 440px; object-fit: cover; border-radius: 12px; display: block; }
.pbm-photo--md img { height: 360px; }
.pbm-photo--sm img { height: 220px; border-radius: 10px; }
.pbm-photo figcaption { font-size: 13px; color: #5E636B; margin-top: 8px; text-align: left; }
.pbm-photo--contain { background: #050505; border-radius: 12px 12px 0 0; }
.pbm-photo--contain img { object-fit: contain; height: 400px; border-radius: 12px 12px 0 0; }
.pbm-photo--top img { height: 400px; object-position: center 20%; border-radius: 12px 12px 0 0; }

/* ---------- Facts table ---------- */
.pbm-facts { margin: 0; border: 1px solid #E6E6E3; border-radius: 12px; overflow: hidden; }
.pbm-facts table { width: 100%; border-collapse: collapse; }
.pbm-facts td { padding: 16px 20px; border: 0; border-bottom: 1px solid #E6E6E3; font-size: 15px; vertical-align: top; }
.pbm-facts tr:last-child td { border-bottom: 0; }
.pbm-facts td:first-child { color: #5E636B; font-size: 14px; width: 34%; }
.pbm-facts td:last-child { font-weight: 600; text-align: right; }

/* ---------- Row lists (projects, timeline) ---------- */
.pbm-rows { margin: 0; }
.pbm-rows table { width: 100%; border-collapse: collapse; border-top: 1px solid #E6E6E3; }
.pbm-rows td { padding: 20px 16px 20px 0; border: 0; border-bottom: 1px solid #E6E6E3; vertical-align: top; font-size: 15px; line-height: 1.55; color: #5E636B; }
.pbm-rows td:first-child { width: 150px; font-weight: 600; font-size: 14px; }
.pbm-rows td:nth-child(2) { color: #0A0A0A; font-family: var(--wp--preset--font-family--archivo); font-weight: 800; font-size: 18px; width: 32%; }
.pbm-rows--timeline td:first-child { color: var(--pbm-accent-text); font-family: var(--wp--preset--font-family--archivo); font-weight: 800; font-size: 18px; width: 110px; }
.pbm-rows--timeline td:nth-child(2) { font-family: inherit; font-weight: 400; font-size: 15px; width: auto; color: #0A0A0A; }

/* ---------- Quote ---------- */
.pbm-quote.wp-block-quote { border: 1px solid #E6E6E3; border-radius: 12px; padding: 32px; margin: 0; }
.pbm-quote.wp-block-quote p { font-family: var(--wp--preset--font-family--archivo); font-weight: 800; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.35; margin: 0; }
.pbm-quote.wp-block-quote cite { display: block; margin-top: 14px; font-size: 14px; font-style: normal; color: #5E636B; }

/* ---------- Recognition strip ---------- */
.pbm-strip { background: #0A0A0A; color: #FFFFFF; border-radius: 10px; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 10px 32px; font-size: 14px; }
.pbm-strip > * { margin: 0 !important; }
.pbm-strip .pbm-strip-label { font-weight: 600; color: var(--pbm-accent); }
.pbm-scheme-entertainment .pbm-strip .pbm-strip-label { color: #FFFFFF; }
.pbm-callout { background: #F5F5F3; border-radius: 10px; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; }
.pbm-callout > * { margin: 0 !important; }
.pbm-callout--ink { background: #0A0A0A; color: #FFFFFF; justify-content: space-between; align-items: center; }
.pbm-callout--ink a { color: #FFFFFF; }
.pbm-callout--blue { background: #EEEFF8; justify-content: space-between; align-items: center; padding: 28px 30px; border-radius: 12px; }

/* ---------- People ---------- */
.pbm-person { display: flex; gap: 18px; align-items: flex-start; }
.pbm-person > * { margin: 0 !important; }
.pbm-avatar {
	flex: none; width: 60px; height: 60px; border-radius: 50%; background: #0A0A0A; color: var(--pbm-accent);
	display: flex !important; align-items: center; justify-content: center;
	font-family: var(--wp--preset--font-family--archivo); font-weight: 800; font-size: 19px;
}
.pbm-scheme-entertainment .pbm-avatar { color: #FFFFFF; }
.pbm-card p.pbm-avatar { color: var(--pbm-accent); font-size: 19px; }
.pbm-scheme-entertainment .pbm-card p.pbm-avatar { color: #FFFFFF; }
.pbm-person-body > * { margin: 0; }
.pbm-person-body > * + * { margin-top: 6px; }
.pbm-person-body h3 { font-size: 19px; }
.pbm-person-body .pbm-role { font-size: 14px; font-weight: 600; color: #5E636B; }
.pbm-person-body p:not(.pbm-role) { font-size: 14px; color: #5E636B; }

/* ---------- Steps ---------- */
.pbm-step { border-top: 2px solid #0A0A0A; padding-top: 18px; }
.pbm-step > * { margin: 0; }
.pbm-step > * + * { margin-top: 10px; }
.pbm-step h3 { font-size: 20px; }
.pbm-step p { font-size: 15px; color: #5E636B; }

/* ---------- Artist cards ---------- */
.pbm-artist { border: 1px solid #E6E6E3; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.pbm-artist > * { margin: 0 !important; }
.pbm-artist-body { padding: 32px; flex: 1 1 auto; display: flex; flex-direction: column; }
.pbm-artist-body > * { margin: 0; }
.pbm-artist-body > * + * { margin-top: 14px; }
.pbm-artist-body h3 { font-size: 32px; font-weight: 900; }
.pbm-artist-body .wp-block-buttons { margin-top: auto; padding-top: 18px; }
.pbm-artist-body .wp-block-button__link { padding: 13px 20px; font-size: 15px; }

/* ---------- Link lists (EESC) ---------- */
.pbm-linklist, .pbm-card ul.pbm-linklist { list-style: none; padding: 0; margin: 0; }
.pbm-linklist li { border-bottom: 1px solid #EDEDEA; }
.pbm-linklist li:last-child { border-bottom: 0; }
.pbm-linklist a { display: flex; gap: 12px; padding: 10px 0; text-decoration: none; font-size: 15px; }
.pbm-linklist a::after { content: "↗"; margin-left: auto; color: #5E636B; }
.pbm-linklist li.is-sub a { padding-left: 16px; font-size: 14px; color: #5E636B; }
.pbm-linklist strong { flex: 0 0 44px; color: var(--pbm-accent-text); font-weight: 600; }
.pbm-books.wp-block-columns { gap: 16px; }
.pbm-book { border: 1px solid #E6E6E3; border-radius: 10px; padding: 18px; height: 100%; box-sizing: border-box; }
.pbm-book > * { margin: 0; }
.pbm-book p:first-child { font-weight: 600; font-size: 15px; }
.pbm-book p + p { font-size: 14px; color: #5E636B; margin-top: 4px; }
.pbm-chair { border: 1px solid #E6E6E3; border-radius: 12px; padding: 26px; }
.pbm-chair > * { margin: 0; }
.pbm-chair > * + * { margin-top: 10px; }

/* ---------- Footer ---------- */
.pbm-footer { background: #0A0A0A; color: #B9BCC1; font-size: 14px; padding-top: 32px; padding-bottom: 32px; }
.pbm-footer a { color: #B9BCC1; text-decoration: none; }
.pbm-footer a:hover { color: #FFFFFF; }
.pbm-footer .pbm-footer-strong a { color: #FFFFFF; text-decoration: underline; }
.pbm-footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.pbm-footer-row > * { margin: 0 !important; }
.pbm-footer .wp-block-navigation { gap: 20px; font-size: 14px; }
.pbm-footer--light { background: #F5F5F3; color: #5E636B; border-top: 1px solid #E6E6E3; }
.pbm-footer--light a { color: #5E636B; }
.pbm-footer--light a:hover { color: #0A0A0A; }
.pbm-footer--light .pbm-footer-strong a { color: #0A0A0A; font-weight: 600; text-decoration: none; }

/* ---------- Forms ---------- */
.pbm-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pbm-form .pbm-field { display: flex; flex-direction: column; gap: 8px; }
.pbm-form .pbm-field--full { grid-column: 1 / -1; }
.pbm-form label { font-size: 14px; font-weight: 500; }
.pbm-form input, .pbm-form select, .pbm-form textarea {
	font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 6px; border: 1px solid #C9CBC6; background: #FFFFFF; color: #0A0A0A; width: 100%; box-sizing: border-box;
}
.pbm-form input, .pbm-form select { height: 48px; padding-top: 0; padding-bottom: 0; }
.pbm-form textarea { min-height: 120px; resize: vertical; }
.pbm-form .pbm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pbm-form button {
	font: inherit; font-weight: 600; font-size: 16px; height: 52px; padding: 0 28px; border: 0; border-radius: 6px;
	background: var(--pbm-btn-bg); color: var(--pbm-btn-ink); cursor: pointer; justify-self: start;
}
.pbm-form button:hover { opacity: .9; }
.pbm-band-ink .pbm-form label { color: #D6D8DB; }
.pbm-band-ink .pbm-form input, .pbm-band-ink .pbm-form select, .pbm-band-ink .pbm-form textarea { background: #17191C; border-color: #3A3D42; color: #FFFFFF; }
.pbm-band-ink .pbm-form button { background: #FFFFFF; color: #0A0A0A; }
.pbm-form-msg { grid-column: 1 / -1; padding: 14px 16px; border-radius: 6px; font-size: 15px; margin: 0; }
.pbm-form-msg--ok { background: #E7F5EA; color: #145A24; }
.pbm-form-msg--err { background: #FCE8E8; color: #8A1116; }
.pbm-contact-side > * { margin: 0; }
.pbm-contact-side > * + * { margin-top: 12px; }

/* ---------- Generic page (legal pages) ---------- */
.pbm-page { padding-top: 64px; padding-bottom: 88px; }
.pbm-page .wp-block-post-title { margin-bottom: 32px; }
.pbm-page .wp-block-post-content > * { max-width: 760px; }

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	.pbm-section { padding-top: 60px; padding-bottom: 60px; }
	.pbm-hero { padding-top: 48px; padding-bottom: 56px; }
	.pbm-photo img { height: 280px; }
	.pbm-photo--contain img, .pbm-photo--top img { height: 320px; }
	.pbm-form { grid-template-columns: 1fr; }
	.pbm-rows table, .pbm-rows tbody, .pbm-rows tr, .pbm-rows td { display: block; width: auto !important; }
	.pbm-rows tr { border-bottom: 1px solid #E6E6E3; padding: 16px 0; }
	.pbm-rows td { border: 0; padding: 2px 0; }
	.pbm-facts td:last-child { text-align: left; }
	.pbm-mainnav { gap: 18px; }
	.pbm-artist-body { padding: 24px; }
}
.pbm-band-ink .pbm-step { border-top-color: #FFFFFF; }
