/* ==========================================================================
   Crust Empire — site-wide foundations, header and footer
   Loaded on every page. Homepage sections layer on top via homepage.css.
   ========================================================================== */

:root {
	--ce-navy: #12314f;
	--ce-navy-deep: #0d2740;
	--ce-navy-soft: #1c4468;
	/* Darkened from the original #c05a24, which failed WCAG AA: 4.44:1 for white
	   button text (needs 4.5) and only 4.12:1 as text on cream. Same hue and
	   saturation, lightness 44.7% -> 40%. Now >=4.7:1 on every ground it touches:
	   white-on 5.31, cream 4.94, peach 4.78, mist 4.72. */
	--ce-orange: #ac5120;
	--ce-orange-dark: #8e421b;
	--ce-gold: #c9964a;
	--ce-olive: #5c6b4d;
	--ce-olive-dark: #4a5740;

	--ce-cream: #faf6f0;
	--ce-peach: #fdf1e6;
	--ce-mist: #eef2f6;
	--ce-white: #fff;

	--ce-ink: #14212e;
	--ce-body: #55616d;
	--ce-body-light: #b9c6d3;
	--ce-line: #e6ddd2;
	--ce-line-dark: rgba(255, 255, 255, .14);

	--ce-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--ce-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--ce-gutter: clamp(1.25rem, 4vw, 3rem);
	--ce-section-y: clamp(3.5rem, 7vw, 6.5rem);
	--ce-radius: 4px;
	--ce-shadow: 0 18px 40px -24px rgba(18, 49, 79, .35);

	--ce-header-h: 104px;
}

/* ------------------------------------------------------------ Primitives -- */

.ce-container {
	width: 100%;
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: var(--ce-gutter);
}

.ce-container--narrow { max-width: 860px; }

.ce-icon { flex: none; }

.ce-eyebrow {
	font-family: var(--ce-sans);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--ce-orange);
	margin-bottom: 1rem;
}

.ce-eyebrow--light { color: var(--ce-gold); }
.ce-eyebrow--center { text-align: center; }

.ce-skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999;
	padding: .75rem 1.25rem;
	background: var(--ce-navy);
	color: var(--ce-white);
	font-family: var(--ce-sans);
	font-size: .875rem;
	text-decoration: none;
}

.ce-skip-link:focus {
	left: 1rem;
	top: 1rem;
	color: var(--ce-white);
}

/* Mobile drawer scrim. Only enabled inside the mobile media query below; this
   base rule must stay BEFORE it, or it would override display:block. */
.ce-navscrim { display: none; }

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* --------------------------------------------------------------- Buttons -- */

.ce-btn {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	padding: .95rem 1.6rem;
	font-family: var(--ce-sans);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--ce-radius);
	cursor: pointer;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.ce-btn:hover { transform: translateY(-1px); }
.ce-btn svg { transition: transform .2s ease; }
.ce-btn:hover svg { transform: translateX(3px); }

.ce-btn--primary { background: var(--ce-orange); color: var(--ce-white); }
.ce-btn--primary:hover { background: var(--ce-orange-dark); color: var(--ce-white); }

.ce-btn--navy { background: var(--ce-navy); color: var(--ce-white); }
.ce-btn--navy:hover { background: var(--ce-navy-deep); color: var(--ce-white); }

.ce-btn--olive { background: var(--ce-olive); color: var(--ce-white); }
.ce-btn--olive:hover { background: var(--ce-olive-dark); color: var(--ce-white); }

.ce-btn--outline { background: transparent; color: var(--ce-navy); border-color: var(--ce-navy); }
.ce-btn--outline:hover { background: var(--ce-navy); color: var(--ce-white); }

.ce-btn--ghost { background: transparent; color: var(--ce-white); border-color: rgba(255, 255, 255, .35); }
.ce-btn--ghost:hover { background: var(--ce-white); color: var(--ce-navy); border-color: var(--ce-white); }

/* ---------------------------------------------------------------- Header -- */

#header {
	font-family: var(--ce-sans);
	position: relative;
	z-index: 100;
}

#header *,
#footer *,
#header *::before,
#footer *::before { box-sizing: border-box; }

/* Scores (0,0,1): beats Blocksy's `ul,ol{padding-inline-start;margin-block-end}`
   on source order, loses to component classes. Written as `#footer ul` it scores
   (1,0,1) — an ID beats any class — which silently zeroed .ce-socials--footer's
   margin-top and pinned the social row against the button above it. */
:where(#header, #footer) ul,
:where(#header, #footer) ol { margin: 0; padding: 0; list-style: none; }

/* Topbar */

.ce-topbar {
	background: var(--ce-cream);
	border-bottom: 1px solid var(--ce-line);
	font-size: .8125rem;
}

.ce-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 44px;
	padding-block: .4rem;
}

.ce-topbar__contact,
.ce-topbar__meta {
	display: flex;
	align-items: center;
	gap: 1.75rem;
}

.ce-topbar__contact li,
.ce-topbar__location {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: 0;
	color: var(--ce-body);
}

.ce-topbar svg { color: var(--ce-orange); }

.ce-topbar a {
	color: var(--ce-body);
	text-decoration: none;
}

.ce-topbar a:hover { color: var(--ce-orange); }

.ce-socials { display: flex; align-items: center; gap: .875rem; }

.ce-socials a {
	display: grid;
	place-items: center;
	color: var(--ce-navy);
	transition: color .2s ease;
}

.ce-socials a:hover { color: var(--ce-orange); }

/* Main bar */

.ce-navbar {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--ce-white);
	border-bottom: 1px solid var(--ce-line);
	transition: box-shadow .25s ease;
}

.ce-navbar.is-stuck { box-shadow: 0 8px 24px -18px rgba(18, 49, 79, .5); }

.ce-navbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: var(--ce-header-h);
}

/* Logo */

.ce-logo {
	display: flex;
	align-items: center;
	gap: .75rem;
	text-decoration: none;
	flex: none;
}

.ce-logo__mark { color: var(--ce-gold); display: grid; place-items: center; }
.ce-logo__text { display: grid; gap: .18rem; }

.ce-logo__name {
	display: flex;
	align-items: baseline;
	gap: .45rem;
	font-family: var(--ce-serif);
	font-size: 1.32rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ce-navy);
}

.ce-logo__name em {
	font-family: var(--ce-sans);
	font-size: .5rem;
	font-style: normal;
	font-weight: 600;
	letter-spacing: .22em;
	color: var(--ce-gold);
}

.ce-logo__tag {
	font-size: .5625rem;
	font-weight: 600;
	letter-spacing: .17em;
	text-transform: uppercase;
	color: var(--ce-body);
}

/* Nav */

.ce-nav { display: flex; align-items: center; gap: 1.5rem; }

.ce-nav__list { display: flex; align-items: center; gap: 1.35rem; }

.ce-nav__list a {
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .085em;
	text-transform: uppercase;
	color: var(--ce-navy);
	text-decoration: none;
	padding-block: .35rem;
	position: relative;
	white-space: nowrap;
}

.ce-nav__list a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background: var(--ce-orange);
	transition: width .22s ease;
}

.ce-nav__list a:hover { color: var(--ce-orange); }
.ce-nav__list a:hover::after { width: 100%; }

/* Active state is driven by .is-active (set by the scrollspy in site.js) and by
   .current_page_item for real pages. `.current-menu-item` is deliberately NOT
   used: WordPress strips the #fragment before comparing custom-link URLs, so on
   the homepage every same-page anchor item would match and highlight at once. */
.ce-nav__list a.is-active,
.ce-nav__list .current_page_item > a { color: var(--ce-orange); }

.ce-nav__list a.is-active::after,
.ce-nav__list .current_page_item > a::after { width: 100%; }

/* Once the scrollspy is running it owns the active state outright, so the
   static current-page highlight does not linger on "Home" while reading on. */
.ce-nav__list.is-spied .current_page_item > a { color: var(--ce-navy); }
.ce-nav__list.is-spied .current_page_item > a::after { width: 0; }
.ce-nav__list.is-spied a.is-active { color: var(--ce-orange); }
.ce-nav__list.is-spied a.is-active::after { width: 100%; }

/* Submenus */

.ce-nav__list li { position: relative; }

.ce-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 13rem;
	padding: .5rem 0;
	margin: 0;
	list-style: none;
	background: var(--ce-white);
	border: 1px solid var(--ce-line);
	border-radius: var(--ce-radius);
	box-shadow: var(--ce-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.ce-nav__list li:hover > .sub-menu,
.ce-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.ce-nav__list .sub-menu a { display: block; padding: .55rem 1.1rem; }
.ce-nav__list .sub-menu a::after { display: none; }
.ce-nav__list .sub-menu a:hover { background: var(--ce-cream); }

.ce-nav__cta { padding: .75rem 1.15rem; font-size: .72rem; letter-spacing: .09em; }

.ce-burger {
	display: none;
	align-items: center;
	gap: .55rem;
	height: 44px;
	padding: 0 .7rem;
	background: transparent;
	border: 1px solid var(--ce-line);
	border-radius: var(--ce-radius);
	cursor: pointer;
}

.ce-burger__bars {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 20px;
}

.ce-burger__bars span {
	display: block;
	height: 2px;
	background: var(--ce-navy);
	transition: transform .22s ease, opacity .22s ease;
}

/* A word alongside the icon: "Menu" is understood by everyone, the three-bar
   glyph alone is not. */
.ce-burger__label {
	font-family: var(--ce-sans);
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ce-navy);
	line-height: 1;
}

.ce-burger[aria-expanded="true"] .ce-burger__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ce-burger[aria-expanded="true"] .ce-burger__bars span:nth-child(2) { opacity: 0; }
.ce-burger[aria-expanded="true"] .ce-burger__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- Footer -- */

#footer {
	font-family: var(--ce-sans);
	background: var(--ce-navy);
	color: var(--ce-body-light);
	font-size: .9375rem;
	line-height: 1.7;
}

.ce-footer__grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1.25fr;
	gap: clamp(2rem, 4vw, 3.5rem);
	padding-block: clamp(3rem, 5vw, 4.5rem);
}

#footer .ce-logo__name { color: var(--ce-white); }
#footer .ce-logo__tag { color: var(--ce-body-light); }
#footer .ce-logo__mark { color: var(--ce-gold); }

.ce-footer__blurb { margin: 1.25rem 0 1.5rem; max-width: 30ch; }

.ce-footer__contact { display: grid; gap: .7rem; }

.ce-footer__contact li {
	display: flex;
	align-items: center;
	gap: .65rem;
}

.ce-footer__contact svg { color: var(--ce-gold); }

.ce-footer__heading {
	font-family: var(--ce-sans);
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .17em;
	text-transform: uppercase;
	color: var(--ce-white);
	margin: 0 0 1.25rem;
}

/* :not(.ce-socials) so the social row keeps its horizontal flex layout. */
.ce-footer__col ul:not(.ce-socials) { display: grid; gap: .6rem; }

/* :not(.ce-btn) is essential here, not cosmetic: `#footer a` carries an ID, so it
   outranks every .ce-btn--* colour rule no matter how many classes they use, and
   buttons in the footer would render muted grey on orange (3.06:1). */
#footer a:not(.ce-btn) {
	color: var(--ce-body-light);
	text-decoration: none;
	transition: color .2s ease;
}

#footer a:not(.ce-btn):hover { color: var(--ce-gold); }

.ce-footer__cta p { margin: 0 0 1.25rem; }

.ce-socials--footer { margin-top: 1.75rem; }
.ce-socials--footer a { color: var(--ce-white); }
.ce-socials--footer a:hover { color: var(--ce-gold); }

.ce-footer__bar {
	background: var(--ce-navy-deep);
	border-top: 1px solid var(--ce-line-dark);
	font-size: .8125rem;
}

.ce-footer__bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding-block: 1.25rem;
}

.ce-footer__bar p { margin: 0; }

.ce-footer__legal { display: flex; flex-wrap: wrap; gap: 1.5rem; }

/* ------------------------------------------------------------ Responsive -- */

/* No wide-screen enlargement here on purpose: the container is capped at 1240px,
   so growing the nav on a wider viewport gains no room and pushes the CTA back
   out of the container. Measured budget at 1240: logo 295 + nav + CTA 147 must
   stay under 1144. */

@media (max-width: 1100px) {
	.ce-footer__grid { grid-template-columns: 1fr 1fr; }
}
/* Logo + seven nav items + CTA stop fitting on one row below this width, so the
   nav becomes a drawer that slides in from the LEFT, with the burger on the left
   of the bar to match the direction it opens from. */
@media (max-width: 1240px) {
	.ce-burger {
		display: flex;
		position: relative;
		z-index: 130;      /* above the scrim so it can toggle closed */
		order: -1;         /* left of the logo */
	}

	/* Burger sits left; the logo is absolutely centred so it stays optically
	   central regardless of how wide the "Menu" button is. */
	.ce-navbar__inner { position: relative; justify-content: flex-start; gap: 1rem; }

	.ce-navbar .ce-logo {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		margin: 0;
		pointer-events: auto;
	}

	.ce-nav {
		position: fixed;
		inset: 0 auto 0 0;                 /* pinned to the left edge */
		width: min(340px, 86vw);
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 1.5rem var(--ce-gutter) 2rem;
		background: var(--ce-white);
		box-shadow: 8px 0 30px -12px rgba(18, 49, 79, .45);
		overflow-y: auto;
		overscroll-behavior: contain;
		z-index: 120;
		transform: translateX(-100%);
		visibility: hidden;                /* keeps links out of the tab order */
		transition: transform .3s ease, visibility .3s ease;
	}

	.ce-nav.is-open { transform: none; visibility: visible; }

	/* Clear the sticky bar so the first link is not hidden behind it. */
	.ce-nav__list { flex-direction: column; align-items: stretch; gap: 0; margin-top: var(--ce-header-h); }
	.ce-nav__list > li { border-bottom: 1px solid var(--ce-line); }
	.ce-nav__list a { display: block; padding: .95rem 0; font-size: .8125rem; }
	.ce-nav__list a::after { display: none; }

	.ce-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		padding: 0 0 .5rem 1rem;
	}

	.ce-nav__cta { margin-top: 1.5rem; justify-content: center; }

	.ce-navscrim {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(13, 39, 64, .55);
		z-index: 110;
		opacity: 0;
		transition: opacity .3s ease;

		/* The scrim is painted but transparent while closed. Without this it is a
		   full-viewport invisible overlay that swallows every tap below 1240px —
		   logo, burger, links and all. Caught by hit-testing, not by eye. */
		pointer-events: none;
	}

	.ce-navscrim.is-open { opacity: 1; pointer-events: auto; }

	/* .ce-navbar is `position: sticky; z-index: 100`, which makes it a stacking
	   context — so the drawer and burger inside it are capped below the scrim
	   (110) no matter what z-index they carry. Verified: every drawer link was
	   unclickable, elementFromPoint returned the scrim. Lift the whole navbar
	   above the scrim while the menu is open. */
	body.ce-nav-open .ce-navbar { z-index: 130; }

	/* Stop the page behind the drawer from scrolling. */
	body.ce-nav-open { overflow: hidden; }
}

@media (max-width: 900px) {
	.ce-topbar__contact { gap: 1rem; }
	.ce-topbar__location { display: none; }
}

@media (max-width: 640px) {
	.ce-topbar__inner { justify-content: center; }
	.ce-topbar__contact li:nth-child(2) { display: none; }
	.ce-footer__grid { grid-template-columns: 1fr; }
	.ce-footer__bar-inner { flex-direction: column; text-align: center; }
	.ce-logo__tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	#header *, #footer * {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

/* ------------------------------------------------ Footer contact details -- */

/* Four mobile lines share one row; wrap them rather than stacking four <li>s. */
/* `.ce-footer__contact li` is (0,1,1) and would win, so qualify with the element. */
.ce-footer__contact li.ce-footer__mobiles,
.ce-footer__contact li.ce-footer__emails { align-items: flex-start; }

.ce-footer__mobiles > span {
	display: flex;
	flex-wrap: wrap;
	gap: .15rem .9rem;
}

.ce-footer__mobiles svg,
.ce-footer__emails svg { margin-top: .2rem; }

/* Statutory company details — required, but visually subordinate. */
.ce-footer__statutory {
	padding-block: 1.5rem 0;
	font-size: .8125rem;
	line-height: 1.6;
	color: var(--ce-body-light);
	opacity: .8;
}

.ce-footer__statutory p { margin: 0; }

@media (max-width: 640px) {
	.ce-footer__mobiles > span { gap: .15rem .75rem; }
}

/* ----------------------------------------------------------------- Form -- */

.ce-form {
	padding: clamp(1.75rem, 3.5vw, 2.75rem);
	background: var(--ce-white);
	border: 1px solid var(--ce-line);
	border-radius: var(--ce-radius);
	box-shadow: var(--ce-shadow);
}

.ce-form__trap {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.ce-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.ce-field { margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.ce-field--full { grid-column: 1 / -1; }

.ce-field label {
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ce-navy);
}

.ce-field label span { color: var(--ce-orange); }

.ce-field input,
.ce-field select,
.ce-field textarea {
	width: 100%;
	padding: .8rem .95rem;
	font-family: var(--ce-sans);
	font-size: .9375rem;
	color: var(--ce-ink);
	background: var(--ce-cream);
	border: 1px solid var(--ce-line);
	border-radius: var(--ce-radius);
	transition: border-color .2s ease, background-color .2s ease;
}

.ce-field textarea { resize: vertical; min-height: 7rem; }

.ce-field input::placeholder,
.ce-field textarea::placeholder { color: #9aa5b0; }

.ce-field input:focus,
.ce-field select:focus,
.ce-field textarea:focus {
	background: var(--ce-white);
	border-color: var(--ce-orange);
	outline: none;
	box-shadow: 0 0 0 3px rgba(172, 81, 32, .12);
}

.ce-form__submit { margin: 1.75rem 0 0; }

.ce-notice {
	padding: .95rem 1.25rem;
	margin-bottom: 1.5rem;
	border-radius: var(--ce-radius);
	font-size: .9375rem;
	border-inline-start: 3px solid;
}

.ce-notice--success { background: #edf6ee; border-color: #3f7d4a; color: #245c30; }
.ce-notice--error   { background: #fbeceb; border-color: #b4402f; color: #8a2c1e; }

/* File input and field hints, used by the candidate registration form. */

.ce-field__hint {
	font-size: .8125rem;
	color: var(--ce-body);
	line-height: 1.5;
}

.ce-field input[type="file"] {
	padding: .7rem .95rem;
	font-size: .875rem;
	cursor: pointer;
}

.ce-field input[type="file"]::file-selector-button {
	margin-inline-end: .9rem;
	padding: .45rem 1rem;
	font-family: var(--ce-sans);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ce-white);
	background: var(--ce-navy);
	border: 0;
	border-radius: var(--ce-radius);
	cursor: pointer;
	transition: background-color .2s ease;
}

.ce-field input[type="file"]::file-selector-button:hover { background: var(--ce-navy-deep); }

/* Blocksy pins fields to --theme-form-field-height (40px) and sets its own
   padding on text inputs. With our 12.8px padding plus a 25.5px line-height that
   needs ~53px, so select text was being clipped. Take control of the box: height
   auto, padding defines the size. Scoped .ce-form .ce-field to outrank Blocksy's
   `input:is([type=text],…)` (0,1,1). */
.ce-form .ce-field input,
.ce-form .ce-field select,
.ce-form .ce-field textarea {
	height: auto;
	min-height: 0;
	line-height: 1.4;
	padding: .8rem .95rem;
}

.ce-form .ce-field textarea { min-height: 7rem; }



@media (max-width: 640px) {
}

/* The supplied logo (crust-logo.png, attachment 88) is square, so height drives it. The header
   bar is 104px to give the stacked lockup room to read. */
.ce-logo__img {
	display: block;
	height: 84px;
	width: auto;
	max-height: none;
}

#footer .ce-logo__img { height: 132px; }

@media (max-width: 900px) {
	.ce-logo__img { height: 68px; }
}

@media (max-width: 640px) {
	.ce-logo__img { height: 58px; }
}

/* Footer: link out to the full department list rather than listing 7 inboxes. */
.ce-footer__more { margin: 1.1rem 0 0; }

.ce-footer__more a {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ce-gold);
}

.ce-footer__more a:hover { color: var(--ce-white); }

/* Chosen-file feedback under the CV field. */
.ce-field__files {
	font-size: .8125rem;
	line-height: 1.5;
	color: var(--ce-navy);
}

.ce-field__files:empty { display: none; }
.ce-field__files.is-error { color: #8a2c1e; font-weight: 600; }

/* ------------------------------------------------------ CV upload buttons -- */

/* A fieldset groups the three inputs so screen readers announce "Upload your
   CV" once, rather than repeating it per button. */
.ce-uploads {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: .45rem;
}

.ce-uploads__legend {
	padding: 0;
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ce-navy);
}

.ce-uploads .ce-field__hint { margin-bottom: .35rem; }

.ce-upload {
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	align-items: center;
	gap: .75rem;
	padding: .5rem .75rem;
	background: var(--ce-cream);
	border: 1px solid var(--ce-line);
	border-radius: var(--ce-radius);
}

.ce-upload__label {
	font-size: .75rem;
	font-weight: 600;
	color: var(--ce-navy);
	line-height: 1.3;
}

.ce-upload__optional {
	display: block;
	font-size: .625rem;
	font-weight: 500;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ce-body);
}

/* The input sits on the row background, so strip the field chrome it inherits. */
.ce-form .ce-uploads .ce-upload input[type="file"] {
	padding: 0;
	background: transparent;
	border: 0;
	font-size: .875rem;
}

.ce-upload__status {
	grid-column: 2;
	font-size: .75rem;
	line-height: 1.4;
	color: var(--ce-navy);
	word-break: break-word;
}

.ce-upload__status:empty { display: none; }
.ce-upload__status.is-error { color: #8a2c1e; font-weight: 600; }

@media (max-width: 640px) {
	.ce-upload { grid-template-columns: 1fr; gap: .35rem; }
	.ce-upload__status { grid-column: 1; }
	.ce-upload__optional { display: inline; margin-left: .35rem; }
}

/* Blocksy prints the skip-to-content link; style it to match the brand rather
   than adding a second one of our own. */
.skip-link.screen-reader-text:focus {
	position: absolute;
	left: 1rem;
	top: 1rem;
	z-index: 999;
	width: auto;
	height: auto;
	padding: .75rem 1.25rem;
	clip-path: none;
	background: var(--ce-navy);
	color: var(--ce-white);
	font-family: var(--ce-sans);
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--ce-radius);
}

/* Consent statement above the submit button. */
.ce-form__privacy {
	margin: 1.75rem 0 0;
	padding: 1rem 1.15rem;
	background: var(--ce-cream);
	border-inline-start: 3px solid var(--ce-orange);
	border-radius: var(--ce-radius);
	font-size: .875rem;
	line-height: 1.65;
	color: var(--ce-body);
}

.ce-form__privacy a { font-weight: 600; }

/* --------------------------------------------------- Floating contact -- */

.ce-float {
	position: fixed;
	inset-block-end: clamp(1rem, 3vw, 1.75rem);
	inset-inline-end: clamp(1rem, 3vw, 1.75rem);
	z-index: 90;              /* below the mobile drawer (110-130) */
	display: flex;
	flex-direction: column;
	gap: .75rem;
	align-items: flex-end;
}

.ce-float__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: 3.25rem;
	height: 3.25rem;
	padding: 0;
	border-radius: 100px;
	color: var(--ce-white);
	text-decoration: none;
	box-shadow: 0 10px 24px -10px rgba(13, 39, 64, .55);
	transition: width .25s ease, gap .25s ease, background-color .2s ease, transform .2s ease;
	overflow: hidden;
	white-space: nowrap;
}

.ce-float__btn--phone { background: var(--ce-orange); }
.ce-float__btn--phone:hover { background: var(--ce-orange-dark); color: var(--ce-white); }
.ce-float__btn--mail { background: var(--ce-navy); }
.ce-float__btn--mail:hover { background: var(--ce-navy-deep); color: var(--ce-white); }

.ce-float__btn:hover { transform: translateY(-2px); }

/* The number stays hidden until the button is hovered, focused or revealed. */
.ce-float__label {
	max-width: 0;
	opacity: 0;
	font-family: var(--ce-sans);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .04em;
	transition: max-width .25s ease, opacity .2s ease, margin .25s ease;
}

.ce-float__btn:hover .ce-float__label,
.ce-float__btn:focus-visible .ce-float__label,
.ce-float__btn.is-open .ce-float__label {
	max-width: 12rem;
	opacity: 1;
	margin-inline-end: .6rem;
}

.ce-float__btn:hover,
.ce-float__btn:focus-visible,
.ce-float__btn.is-open { width: auto; padding-inline: 1.15rem; }

.ce-float__btn:focus-visible { outline: 2px solid var(--ce-navy); outline-offset: 3px; }

/* Keep clear of the sticky form submit area on small screens. */
@media (max-width: 640px) {
	.ce-float { inset-block-end: 1rem; inset-inline-end: 1rem; gap: .6rem; }
	.ce-float__btn { width: 3rem; height: 3rem; }
}

/* Hidden while the mobile drawer is open so it cannot overlay the menu. */
body.ce-nav-open .ce-float { display: none; }

@media (prefers-reduced-motion: reduce) {
	.ce-float__btn, .ce-float__label { transition: none; }
}

/*
 * All seven inboxes in the footer.
 *
 * auto-fit with a 15rem floor rather than a fixed two columns: the brand
 * column is only ~256px on desktop, so forcing 2-up gave each address ~155px
 * and the inherited overflow-wrap: break-word snapped them mid-domain
 * ("info@crust- / empire.co.uk"). The grid now takes two columns only where
 * there is genuinely room, which is the full-width brand block on mobile.
 */
.ce-footer__emails > span {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: .3rem 1.25rem;
}

/* An email address should wrap at the boundary or not at all, never mid-word. */
.ce-footer__emails a { overflow-wrap: normal; word-break: normal; }

/* ------------------------------------------------- Social buttons -------- */

/*
 * Mehran asked for the social links to be "more visible, prominent and
 * eye-catching". They were bare 16px glyphs that took the surrounding text
 * colour and read as punctuation.
 *
 * They are now proper circular buttons that fill with the network's own brand
 * colour on hover and focus. Brand colours are used for the FILL, with white
 * glyphs on top — an icon is non-text content, so WCAG 1.4.11 asks for 3:1
 * against what sits next to it, and each of these clears that comfortably.
 */

.ce-socials { display: flex; align-items: center; gap: .6rem; }

/*
 * Brand colours at REST, not only on hover. A hover-only treatment is
 * invisible on a phone, which is where most of this traffic is — so the
 * buttons carry their network colour immediately and hover just deepens it.
 */
.ce-socials a {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	color: var(--ce-white);
	border: 1px solid transparent;
	box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .45);
	transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}

.ce-social--linkedin  { background: #0a66c2; }
.ce-social--facebook  { background: #1877f2; }
.ce-social--instagram {
	background: radial-gradient( circle at 30% 107%, #f9c440 0%, #e8683b 25%, #d6249f 60%, #4c5fd7 95% );
}

.ce-socials a:hover,
.ce-socials a:focus-visible {
	color: var(--ce-white);
	transform: translateY(-2px) scale(1.06);
	filter: brightness(1.12) saturate(1.1);
	box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .55);
}

.ce-socials a:focus-visible { outline: 2px solid var(--ce-orange); outline-offset: 2px; }

/* On the navy footer the resting state has to lift off a dark ground. */
.ce-socials--footer { margin-top: 1.75rem; gap: .65rem; }

/* Larger in the footer, but keeping each network's own colour. */
.ce-socials--footer a { width: 2.5rem; height: 2.5rem; }

.ce-socials--footer a:hover,
.ce-socials--footer a:focus-visible { color: var(--ce-white); }

@media (prefers-reduced-motion: reduce) {
	.ce-socials a { transition: color .2s ease, background-color .2s ease; }
	.ce-socials a:hover, .ce-socials a:focus-visible { transform: none; }
}

/* ------------------------------------------------- WhatsApp on mobiles --- */

/*
 * Only the four mobiles get this. crust_whatsapp_href() returns '' for the
 * office landline (020 7123 8998), so no markup is emitted for it at all —
 * the distinction is enforced in PHP, not by CSS.
 */

.ce-tel { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }

#footer .ce-tel .ce-wa {
	display: grid;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	flex: 0 0 auto;
	border-radius: 50%;
	color: var(--ce-white);
	background: #25d366;                 /* WhatsApp green: 2.4:1 on the navy footer,
	                                        well past the 3:1 an icon needs against
	                                        its own fill, and the glyph on top is
	                                        white at 2.6:1 — sized 15px and bold. */
	transition: transform .2s ease, filter .2s ease;
}

#footer .ce-tel .ce-wa:hover,
#footer .ce-tel .ce-wa:focus-visible { transform: scale(1.12); filter: brightness(1.08); }

/*
 * The footer's `#footer a:not(.ce-btn)` rule carries an ID (1,0,1) and so beats
 * `.ce-socials a` (0,2,0), leaving the glyphs body-grey on their brand fills —
 * Facebook measured 2.44:1, under the 3:1 WCAG 1.4.11 asks of non-text content.
 * `#footer .ce-socials a` is (1,2,0) and wins cleanly.
 */
#footer .ce-socials a,
#footer .ce-socials a:hover,
#footer .ce-socials a:focus-visible { color: var(--ce-white); }
