/* ==========================================================================
   SITE FOOTER
   Loaded last, sitewide.

   Two earlier layers have to be outranked here, which is why !important
   appears on the colour declarations and nowhere else:

   1. main.css:4422, a "Sticky Footer Layout Fix" block that repaints the
      whole footer with !important.
   2. main.css:4487+, a `[data-theme="dark"] .site-footer …` set that is more
      specific than anything scoped to `.site-footer` alone.

   Everything below is driven by the token block: the component rules name
   --ft-* and never a literal colour, so light and dark are two short lists of
   values rather than two copies of the stylesheet.

   Markup is untouched. footer.php carries the region-aware menu logic
   (data-us-href / data-au-order / data-region-only) that region-switch.js
   rewrites at runtime, and none of that should be disturbed for a restyle.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens -- light
   -------------------------------------------------------------------------- */
.site-footer {
	--ft-ease: cubic-bezier(0.16, 1, 0.3, 1);

	--ft-bg-a: var(--color-surface, #f4f2ef);
	--ft-bg-b: var(--color-bg, #faf9f7);
	--ft-wash: rgba(var(--color-accent-rgb), 0.1);

	--ft-strong: var(--color-text);
	--ft-text: var(--color-text-muted);
	--ft-dim: rgba(var(--ink-rgb, 13, 13, 13), 0.58);
	--ft-faint: rgba(var(--ink-rgb, 13, 13, 13), 0.45);
	--ft-line: var(--color-border);
	--ft-chip: rgba(var(--ink-rgb, 13, 13, 13), 0.03);
	--ft-tip-bg: #0d1a16;
	--ft-tip-ink: #fff;
}

/* --------------------------------------------------------------------------
   Tokens -- dark

   The footer follows the theme now rather than staying dark in both, so the
   toggle reads as one page changing instead of the page changing above a
   panel that does not.
   -------------------------------------------------------------------------- */
[data-theme="dark"] .site-footer {
	--ft-bg-a: #0a1210;
	--ft-bg-b: #050a09;
	--ft-wash: rgba(var(--color-accent-rgb), 0.14);

	--ft-strong: #fff;
	--ft-text: rgba(255, 255, 255, 0.72);
	--ft-dim: rgba(255, 255, 255, 0.52);
	--ft-faint: rgba(255, 255, 255, 0.38);
	--ft-line: rgba(255, 255, 255, 0.1);
	--ft-chip: rgba(255, 255, 255, 0.04);
	--ft-tip-bg: #fff;
	--ft-tip-ink: #08100e;
}

/* --------------------------------------------------------------------------
   Panel
   Medium height: the previous build ran to 717px at desktop, most of it air.
   -------------------------------------------------------------------------- */
.site-footer {
	position: relative !important;
	margin-top: auto !important;
	padding: clamp(2.5rem, 4.5vw, 3.25rem) 0 clamp(1.1rem, 2vw, 1.4rem) !important;
	overflow: hidden !important;
	isolation: isolate;
	background:
		radial-gradient(90% 80% at 6% 0%, var(--ft-wash), transparent 55%),
		linear-gradient(180deg, var(--ft-bg-a) 0%, var(--ft-bg-b) 100%) !important;
	border-top: 1px solid var(--ft-line) !important;
	color: var(--ft-text);
	transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

/*
 * The hairline along the top edge, with a slow sweep along it.
 *
 * The sweep is a transform, not background-position -- background-position
 * cannot run on the compositor, so it kept the main thread painting every
 * frame for as long as a page was open. The line is the gradient's own width
 * (220%) and slides instead; the panel's overflow: hidden clips it. Same path
 * as before: the old offsets of -60%..160% on a 220% background put the
 * gradient at +0.72W..-1.92W, which as a share of the line's 2.2W is
 * +32.7273%..-87.2727%.
 */
.site-footer::before {
	content: "" !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: auto !important;
	width: 220% !important;
	height: 1px !important;
	z-index: 1;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(var(--color-accent-rgb), 0) 20%,
		var(--color-accent) 50%,
		rgba(var(--color-accent-rgb), 0) 80%,
		transparent 100%
	) !important;
	opacity: 0.85 !important;
	animation: ft-sweep 9s linear infinite;
	will-change: transform;
}
@keyframes ft-sweep {
	from { transform: translateX(32.7273%); }
	to   { transform: translateX(-87.2727%); }
}

/* The blueprint grid this used to carry is gone. */
.site-footer::after { content: none !important; }

/* The existing ambient blob, given a slow drift so the panel is not static. */
.footer-glow {
	position: absolute !important;
	top: -180px !important;
	left: -120px !important;
	right: auto !important;
	bottom: auto !important;
	width: min(460px, 60vw) !important;
	height: min(460px, 60vw) !important;
	border-radius: 50% !important;
	background: radial-gradient(circle, rgba(var(--color-accent-rgb), 0.16), transparent 68%) !important;
	pointer-events: none !important;
	z-index: -1;
	animation: ft-drift 26s ease-in-out infinite alternate;
}
@keyframes ft-drift {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(70px, 40px, 0) scale(1.12); }
}

.site-footer .container { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
	gap: clamp(1.5rem, 3vw, 2.5rem);
	align-items: start;
	padding-bottom: clamp(1.5rem, 3vw, 2rem);
}

/* -------------------------------------------------- brand */
.footer-brand .footer-logo,
.footer-brand img {
	height: 34px;
	width: auto;
	margin-bottom: 0.9rem;
	transition: transform 0.5s var(--ft-ease);
}
.footer-brand a:hover img { transform: translateY(-2px); }

.site-footer .footer-brand p {
	max-width: 40ch;
	margin: 0 0 1.1rem;
	font-size: 0.85rem;
	line-height: 1.65;
	color: var(--ft-dim) !important;
}

/* -------------------------------------------------- newsletter */

/*
 * Visual only -- see the comment in footer.php and js/footer.js. The pill
 * input + button follows .btn-hero's own colour and shadow so this reads
 * as the same brand button everywhere else, not a second button language
 * invented for one form.
 */
.footer-newsletter {
	margin: 0 0 1.25rem;
}
.footer-newsletter-label {
	display: block;
	margin-bottom: 0.55rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--ft-strong) !important;
}
.footer-newsletter-row {
	display: flex;
	gap: 0.5rem;
	max-width: 360px;
}
.footer-newsletter-input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.7rem 1rem;
	border: 1px solid var(--ft-line);
	border-radius: 100px;
	background: var(--ft-chip);
	color: var(--ft-strong);
	font-size: 0.85rem;
	transition: border-color 0.35s var(--ft-ease), box-shadow 0.35s var(--ft-ease),
	            background-color 0.35s var(--ft-ease);
}
.footer-newsletter-input::placeholder { color: var(--ft-faint); }
.footer-newsletter-input:focus-visible {
	outline: none;
	border-color: var(--color-accent);
	box-shadow: 0 0 0 4px rgba(var(--color-accent-rgb), 0.18);
	background: var(--ft-bg-b);
}

.footer-newsletter-btn {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.7rem 1.1rem;
	border: none;
	border-radius: 100px;
	background-color: var(--color-accent);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(var(--color-accent-rgb), 0.3);
	transition: transform 0.3s var(--ft-ease), box-shadow 0.3s var(--ft-ease),
	            background-color 0.3s var(--ft-ease);
}
.footer-newsletter-btn svg { width: 15px; height: 15px; transition: transform 0.3s var(--ft-ease); }
.footer-newsletter-btn:hover {
	background-color: var(--color-accent-hover);
	box-shadow: 0 6px 20px rgba(var(--color-accent-rgb), 0.45);
	transform: translateY(-2px);
}
.footer-newsletter-btn:hover svg { transform: translateX(3px); }
.footer-newsletter-btn:focus-visible {
	outline: 3px solid rgba(var(--color-accent-rgb), 0.5);
	outline-offset: 2px;
}

.footer-newsletter-note {
	margin: 0.55rem 0 0;
	font-size: 0.72rem;
	color: var(--ft-faint) !important;
	transition: color 0.3s var(--ft-ease);
}
/* The confirmation state, entirely from the class js/footer.js adds --
   no extra markup for a "sent" version of the form. */
.footer-newsletter.is-subscribed .footer-newsletter-input {
	border-color: var(--color-accent);
}
.footer-newsletter.is-subscribed .footer-newsletter-note {
	color: var(--color-accent-hover) !important;
	font-weight: 600;
}

@media (max-width: 480px) {
	.footer-newsletter-row { max-width: none; }
}

/* -------------------------------------------------- social */
.footer-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.site-footer .social-pill {
	position: relative;
	display: grid !important;
	place-items: center;
	width: 36px !important;
	height: 36px !important;
	border-radius: 50% !important;
	border: 1px solid var(--ft-line) !important;
	background: var(--ft-chip) !important;
	color: var(--ft-text) !important;
	transition: transform 0.4s var(--ft-ease), border-color 0.4s var(--ft-ease),
	            color 0.4s var(--ft-ease), box-shadow 0.4s var(--ft-ease),
	            background-color 0.4s var(--ft-ease);
}
.site-footer .social-pill svg,
.site-footer .social-icon-svg { width: 15px; height: 15px; }

.site-footer .social-pill:hover {
	/* Back to a plain lift -- the rotate added here was a flourish, removed
	   on request in favour of the icons' default/standard hover. */
	transform: translateY(-3px) !important;
	border-color: rgba(var(--color-accent-rgb), 0.7) !important;
	background: rgba(var(--color-accent-rgb), 0.12) !important;
	color: var(--color-accent-hover) !important;
	box-shadow: 0 10px 22px -10px rgba(var(--color-accent-rgb), 0.55) !important;
}
.site-footer .social-pill:focus-visible {
	outline: 3px solid rgba(var(--color-accent-rgb), 0.5);
	outline-offset: 3px;
}

/* The label each pill already carries in data-tip, shown on hover. */
.site-footer .social-pill[data-tip]::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 9px);
	left: 50%;
	padding: 0.26rem 0.55rem;
	border-radius: 6px;
	background: var(--ft-tip-bg);
	color: var(--ft-tip-ink);
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	white-space: nowrap;
	opacity: 0;
	transform: translate(-50%, 5px);
	transition: opacity 0.3s var(--ft-ease), transform 0.3s var(--ft-ease);
	pointer-events: none;
}
.site-footer .social-pill:hover::after,
.site-footer .social-pill:focus-visible::after {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* -------------------------------------------------- offices */
/* -------------------------------------------------- headings */
.site-footer .footer-heading {
	position: relative;
	margin: 0 0 0.8rem !important;
	padding-bottom: 0.5rem;
	font-size: 0.66rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase;
	color: var(--ft-strong) !important;
}
.site-footer .footer-heading-spaced { margin-top: 1.5rem !important; }
/* A heading that is itself a link (e.g. "How We Work") reads as a heading,
   and only shows it is clickable on hover/focus. */
.site-footer .footer-heading-link {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}
.site-footer .footer-heading-link:hover,
.site-footer .footer-heading-link:focus-visible { color: var(--color-accent); }

/* A short accent rule that extends when the column is hovered -- the whole
   column is the target, so the cue belongs to the group, not to one link. */
.site-footer .footer-heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 20px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
	transition: width 0.45s var(--ft-ease);
}
.site-footer .footer-col:hover .footer-heading::after,
.site-footer .footer-brand:hover .footer-heading::after { width: 40px; }

/* -------------------------------------------------- links */
.site-footer .footer-links {
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-footer .footer-links li { margin: 0 0 0.35rem; }

.site-footer .footer-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.82rem !important;
	line-height: 1.45;
	color: var(--ft-text) !important;
	text-decoration: none !important;
	/* The underline is painted rather than declared, so it can grow from the
	   left instead of appearing all at once. */
	background-image: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: color 0.35s var(--ft-ease), transform 0.35s var(--ft-ease),
	            background-size 0.4s var(--ft-ease);
}
.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible {
	color: var(--ft-strong) !important;
	transform: translateX(3px);
	background-size: 100% 1px;
}

/* -------------------------------------------------- hiring badge */
.site-footer .badge-hiring {
	/* Drops main.css's box-shadow pulse, which still ran underneath the ring
	   below: box-shadow repaints every frame, and the ring is the intended
	   signal. Two classes deep so the stale service-page copies of main.css
	   (one class, loaded later) cannot reapply it. */
	animation: none;
	position: relative;
	display: inline-block;
	padding: 0.15rem 0.5rem;
	border-radius: 100px;
	background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
	color: #04120b;
	font-size: 0.55rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: middle;
}
/* A single expanding ring rather than a flashing chip -- it reads as a live
   signal without pulling the eye off the links around it. */
.site-footer .badge-hiring::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 1px solid var(--color-accent);
	animation: ft-ring 2.8s var(--ft-ease) infinite;
}
@keyframes ft-ring {
	0%   { transform: scale(1); opacity: 0.8; }
	70%  { transform: scale(1.3); opacity: 0; }
	100% { transform: scale(1.3); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Bottom bar
   -------------------------------------------------------------------------- */
.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem 2rem;
	padding-top: clamp(0.9rem, 2vw, 1.15rem);
	border-top: 1px solid var(--ft-line);
}

.footer-legal {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
}
.site-footer .footer-legal a {
	position: relative;
	font-size: 0.76rem !important;
	color: var(--ft-dim) !important;
	text-decoration: none !important;
	transition: color 0.3s var(--ft-ease);
}
.site-footer .footer-legal a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -3px;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s var(--ft-ease);
}
.site-footer .footer-legal a:hover { color: var(--color-accent-hover) !important; }
.site-footer .footer-legal a:hover::after { transform: scaleX(1); }

.site-footer .footer-copy {
	margin: 0 !important;
	font-size: 0.74rem !important;
	color: var(--ft-faint) !important;
	/*
	 * The scroll-to-top and chat buttons are fixed to the bottom-right corner,
	 * and at the foot of the page that is precisely where this line ends -- the
	 * button was printing over "All rights reserved". Enough room for the
	 * button plus its 2rem offset.
	 */
	padding-right: 84px;
}

/* --------------------------------------------------------------------------
   Dark parity

   main.css:4487+ repeats the whole footer palette under
   `[data-theme="dark"] .site-footer …`, every declaration !important. Those
   selectors are more specific than the component rules above, so !important
   alone does not beat them -- the rules have to be matched selector for
   selector and win on source order instead.

   Nothing new is decided here. Each rule points at the same --ft-* token the
   light rule uses, so the palette still lives in one place at the top.
   -------------------------------------------------------------------------- */
[data-theme="dark"] .site-footer {
	background:
		radial-gradient(90% 80% at 6% 0%, var(--ft-wash), transparent 55%),
		linear-gradient(180deg, var(--ft-bg-a) 0%, var(--ft-bg-b) 100%) !important;
	border-top-color: var(--ft-line) !important;
}

[data-theme="dark"] .footer-glow {
	background: radial-gradient(circle, rgba(var(--color-accent-rgb), 0.16), transparent 68%) !important;
}

[data-theme="dark"] .site-footer .footer-brand p { color: var(--ft-dim) !important; }

[data-theme="dark"] .site-footer .footer-heading {
	color: var(--ft-strong) !important;
	opacity: 1 !important;
}

[data-theme="dark"] .site-footer .footer-links a { color: var(--ft-text) !important; }
[data-theme="dark"] .site-footer .footer-links a:hover,
[data-theme="dark"] .site-footer .footer-links a:focus-visible { color: var(--ft-strong) !important; }

[data-theme="dark"] .site-footer .social-pill {
	background: var(--ft-chip) !important;
	border-color: var(--ft-line) !important;
	color: var(--ft-text) !important;
}
[data-theme="dark"] .site-footer .social-pill:hover {
	background: rgba(var(--color-accent-rgb), 0.12) !important;
	border-color: rgba(var(--color-accent-rgb), 0.7) !important;
	color: var(--color-accent) !important;
}

[data-theme="dark"] .site-footer .footer-legal a { color: var(--ft-dim) !important; }
[data-theme="dark"] .site-footer .footer-legal a:hover { color: var(--color-accent) !important; }
[data-theme="dark"] .site-footer .footer-copy { color: var(--ft-faint) !important; }

/* --------------------------------------------------------------------------
   Reveal on scroll

   The hidden state is gated on `.footer-js`, which js/footer.js puts on
   <html> before it observes anything. CSS alone never hides the footer, so a
   blocked script cannot leave it blank.
   -------------------------------------------------------------------------- */
.footer-js .footer-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.6s var(--ft-ease), transform 0.6s var(--ft-ease);
}
.footer-js .footer-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
	.footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: clamp(1.5rem, 4vw, 2.25rem);
	}
	.footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
	.footer-grid { grid-template-columns: minmax(0, 1fr); }
	.site-footer .footer-brand p { max-width: none; }
	.footer-bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
	.footer-legal { gap: 0.75rem 1.1rem; }
	/* The bar stacks here and the buttons sit lower, so the reserve above is
	   not needed and would only push the line off-centre. */
	.site-footer .footer-copy { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.site-footer::before,
	.footer-glow,
	.site-footer .badge-hiring::before { animation: none; }
	.footer-js .footer-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.site-footer .social-pill:hover,
	.site-footer .footer-links a:hover,
	.footer-brand a:hover img,
	.footer-newsletter-btn:hover { transform: none !important; }
}
