/* Somerset — supplemental rules for Direction A, "Policy Schedule".
 * Tokens come from theme.json (var(--wp--preset--color--*)); this file only
 * adds what theme.json can't express. Loaded on the front end and in the editor. */

:root {
	--som-ink: var(--wp--preset--color--ink);
	--som-steel: var(--wp--preset--color--steel);
	--som-rule: var(--wp--preset--color--rule);
	--som-brass: var(--wp--preset--color--brass);
	--som-brass-deep: var(--wp--preset--color--brass-deep);
	--som-mono: var(--wp--preset--font-family--mono);
	--som-serif: var(--wp--preset--font-family--display);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.wp-site-blocks > * + * { margin-block-start: 0; }
::selection { background: #e9dcc0; color: var(--som-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--som-brass); outline-offset: 2px;
}
h1, h2, .wp-block-post-title { text-wrap: balance; }
p { text-wrap: pretty; }
em { font-style: italic; }
h1 em, h2 em, .som-hero h1 em { color: var(--som-brass-deep); }

/* ---------- Mono label (paragraph style) ---------- */
.is-style-som-label {
	font-family: var(--som-mono);
	font-weight: 500;
	font-size: 0.72rem !important;
	line-height: 1.5;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--som-steel);
	margin: 0;
}

/* ---------- Header ---------- */
.som-header { position: sticky; top: 0; z-index: 20; }
.admin-bar .som-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .som-header { top: 46px; } }
.som-wordmark .wp-block-site-title a { color: var(--som-ink); }
.som-wordmark .is-style-som-label { font-size: 0.62rem !important; letter-spacing: 0.15em; }
.som-nav .wp-block-navigation-item__content { text-decoration: none; color: var(--som-steel); }
.som-nav .wp-block-navigation-item__content:hover,
.som-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--som-ink); }
.som-nav .current-menu-item > .wp-block-navigation-item__content { box-shadow: inset 0 -2px 0 var(--som-brass); }
.som-nav .som-nav-cta > .wp-block-navigation-item__content {
	background: var(--som-ink); color: #fff !important; padding: 0.45rem 0.95rem; border-radius: 3px; box-shadow: none !important;
}
.som-nav .som-nav-cta > .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--ink-2); }
.som-nav .wp-block-navigation__submenu-container {
	border: 1px solid var(--som-rule) !important; border-radius: 3px; padding: 0.4rem 0; min-width: 260px !important;
	box-shadow: 0 10px 30px rgba(20, 36, 59, 0.10);
}
.som-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.5rem 1rem !important; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.1rem; }
.wp-block-navigation__responsive-container.is-menu-open .som-nav-cta > .wp-block-navigation-item__content { margin-top: 0.5rem; }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--som-ink); border: 1px solid var(--som-ink); padding: 0.7rem 1.25rem;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--som-ink); color: #fff; }
.wp-block-button__link { text-decoration: none; transition: background-color 120ms ease, color 120ms ease; }

/* ---------- Home hero ---------- */
.som-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.07; }
.som-hero .som-lede { color: var(--som-steel); max-width: 46ch; font-size: 1.1rem; }
.som-hero > .wp-block-columns { align-items: flex-end !important; }

/* ---------- Certificate panel (group style) ---------- */
.is-style-som-cert {
	background: #fff; border: 1px solid var(--som-rule); padding: 1.15rem 1.3rem 1.25rem; font-size: 0.92rem;
}
.is-style-som-cert > .som-cert-hd {
	display: flex; justify-content: space-between; gap: 1rem;
	font-family: var(--som-mono); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.13em; text-transform: uppercase;
	color: var(--som-brass-deep); border-bottom: 1px solid var(--som-rule); padding-bottom: 0.7rem; margin: 0 0 0.8rem;
}
.is-style-som-cert .wp-block-table { margin: 0; }
.is-style-som-cert table { border-collapse: collapse; width: 100%; }
.is-style-som-cert td { border: 0 !important; padding: 0.3rem 0; vertical-align: baseline; }
.is-style-som-cert td:first-child {
	font-family: var(--som-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--som-steel); white-space: nowrap; padding-right: 1.2rem; width: 1%;
}

/* ---------- Schedule of services (group style) ----------
 * A group of rows; each row is a group with four paragraphs:
 * .som-no (Item n) · .som-t (title, holds the link) · .som-d (description) · .som-go (arrow).
 * The title link is stretched over the whole row so the row is one click target. */
.is-style-som-schedule { border-top: 1px solid var(--som-rule); }
.is-style-som-schedule > * + * { margin-top: 0 !important; }
.som-row {
	position: relative;
	display: grid !important;
	grid-template-columns: 4.5rem minmax(0, 1.1fr) minmax(0, 2fr) 1.5rem;
	gap: 1rem !important; align-items: baseline;
	padding: 1.05rem 0.25rem; border-bottom: 1px solid var(--som-rule);
	transition: background-color 120ms ease;
}
.som-row > * { margin: 0 !important; }
.som-row:hover { background: rgba(168, 130, 58, 0.06); }
.som-row .som-no { font-family: var(--som-mono); font-size: 0.78rem; color: var(--som-brass-deep); }
.som-row .som-t { font-family: var(--som-serif); font-weight: 600; font-size: 1.15rem; line-height: 1.3; }
.som-row .som-t a { color: var(--som-ink); text-decoration: none; }
.som-row .som-t a::after { content: ""; position: absolute; inset: 0; }
.som-row .som-d { color: var(--som-steel); font-size: 0.95rem; }
.som-row .som-go { color: var(--som-brass); text-align: right; transition: transform 120ms ease; }
.som-row:hover .som-go { transform: translateX(3px); }
.som-row:focus-within { outline: 2px solid var(--som-brass); outline-offset: -2px; }
.som-row .som-t a:focus-visible { outline: none; }
@media (max-width: 760px) {
	.som-row { grid-template-columns: 3.5rem minmax(0, 1fr) 1.2rem; row-gap: 0.25rem !important; }
	.som-row .som-d { grid-column: 2 / 3; }
	.som-row .som-go { grid-row: 1; grid-column: 3; }
}

/* ---------- Panels, notes, lists, tables ---------- */
.is-style-som-panel { background: #fff; border: 1px solid var(--som-rule); padding: clamp(1.25rem, 3vw, 2rem); }
.is-style-som-panel > :first-child { margin-top: 0; }

.is-style-som-note {
	border-left: 3px solid var(--som-brass); background: #fbf6ec; padding: 0.8rem 1rem; font-size: 0.92rem; color: #4d3c17;
}
.is-style-som-note::before {
	content: "Draft note for Stephen"; display: block; font-family: var(--som-mono); font-size: 0.66rem;
	letter-spacing: 0.13em; text-transform: uppercase; color: var(--som-brass-deep); margin-bottom: 0.25rem;
}
.is-style-som-note > * { margin: 0; }

.is-style-som-ticks { list-style: none; padding-left: 0 !important; }
.is-style-som-ticks > li { position: relative; padding: 0.55rem 0 0.55rem 1.6rem; border-bottom: 1px solid var(--som-rule); }
.is-style-som-ticks > li:first-child { border-top: 1px solid var(--som-rule); }
.is-style-som-ticks > li::before {
	content: ""; position: absolute; left: 0; top: 1.15rem; width: 0.85rem; height: 1px; background: var(--som-brass);
}

.is-style-som-ledger table { border-collapse: collapse; width: 100%; font-size: 0.95rem; background: #fff; }
.is-style-som-ledger th, .is-style-som-ledger td { border: 0; border-bottom: 1px solid var(--som-rule); padding: 0.65rem 0.8rem; text-align: left; }
.is-style-som-ledger thead { border-bottom: 0; }
.is-style-som-ledger thead th {
	font-family: var(--som-mono); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--som-steel); background: var(--wp--preset--color--paper); border-bottom: 1px solid var(--som-ink);
}
.is-style-som-ledger td:last-child, .is-style-som-ledger th:last-child { text-align: right; white-space: nowrap; font-family: var(--som-mono); font-size: 0.85rem; }
.is-style-som-ledger figcaption { text-align: left; font-size: 0.85rem; color: var(--som-steel); }

/* Section heading pair: mono label above a serif heading */
.som-section-head { margin-bottom: 1.25rem; }
.som-section-head > * { margin: 0 !important; }
.som-section-head > * + * { margin-top: 0.4rem !important; }

/* ---------- Title band on inner pages ---------- */
.som-title-band .wp-block-post-title { font-size: clamp(2rem, 4vw, 3rem); }

/* ---------- Footer ---------- */
.som-footer .wp-block-site-title a { color: #fff; }
.som-footer-links { list-style: none; padding: 0 !important; margin: 0.6rem 0 0; font-size: 0.93rem; }
.som-footer-links li + li { margin-top: 0.35rem; }
.som-footer-links a { text-decoration: none; color: #dfe5ee !important; }
.som-footer-links a:hover { color: #fff !important; text-decoration: underline; }

/* ---------- Fluent Forms skin ---------- */
.fluentform { --fluentform-primary: var(--som-ink); }
.fluentform .ff-el-form-control {
	font-family: var(--wp--preset--font-family--body); font-size: 1rem; color: var(--som-ink);
	background: #fff; border: 1px solid #c4ccd8; border-radius: 3px; padding: 0.7rem 0.85rem; box-shadow: none;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}
.fluentform .ff-el-form-control:focus {
	border-color: var(--som-ink); box-shadow: 0 0 0 3px rgba(168, 130, 58, 0.25); outline: none;
}
.fluentform .ff-el-input--label label {
	font-family: var(--som-mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--som-steel);
}
.fluentform .ff-el-is-required .ff-el-is-asterisk,
.fluentform .ff-el-input--label.asterisk-right label:after { color: var(--som-brass-deep); }
.fluentform .ff-el-group { margin-bottom: 1.15rem; }
.fluentform .ff-btn-submit {
	font-family: var(--wp--preset--font-family--body); font-weight: 500; font-size: 1rem;
	background: var(--som-ink) !important; color: #fff !important; border: 1px solid var(--som-ink); border-radius: 3px;
	padding: 0.8rem 1.5rem; cursor: pointer; transition: background-color 120ms ease;
}
.fluentform .ff-btn-submit:hover { background: var(--wp--preset--color--ink-2) !important; }
.fluentform .ff-message-success {
	border: 1px solid var(--som-rule); border-left: 3px solid var(--som-brass); border-radius: 0; background: #fff; color: var(--som-ink); box-shadow: none;
}
.fluentform .error.text-danger, .fluentform .ff-el-is-error .text-danger { color: #a61b1b; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
	.som-row, .som-row .som-go, .wp-block-button__link, .fluentform .ff-el-form-control, .fluentform .ff-btn-submit { transition: none; }
}

/* ---------- Home: who Somerset serves ---------- */
.som-who-cols { gap: clamp(1.25rem, 3vw, 2.25rem) !important; }
.som-who-cols > .wp-block-column { border-top: 2px solid var(--som-brass); padding-top: 1rem; }
.som-who-cols h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.som-who-cols p { color: var(--som-steel); font-size: 0.95rem; margin: 0; }
@media (min-width: 782px) and (max-width: 1080px) {
	.som-who-cols { flex-wrap: wrap !important; }
	.som-who-cols > .wp-block-column { flex-basis: calc(50% - 1.25rem) !important; flex-grow: 0; }
}

/* Footer sits directly under the navy CTA band on most pages: keep them distinct. */
.som-footer { border-top: 1px solid #2c3f5c; }
.wp-block-post-content .is-style-som-label:not(:first-child) { margin-top: 1.8rem; }
.wp-block-post-content .is-style-som-label + * { margin-top: 0.6rem; }
