/*
 * Overscrolling on a phone pulls the page past its ends and exposes the
 * canvas, so it carries the header colour at the top and the footer colour at
 * the bottom instead of white. Literal values: the palette variables live on
 * the body, which is not the element painting the canvas.
 */
html {
	background: linear-gradient(to bottom, #f7f4ed 0%, #f7f4ed 50%, #071024 50%, #071024 100%);
}

.twd-site-footer {
	background: var(--twd-color-navy, #071024);
	color: rgba(247, 244, 237, 0.78);
	font-family: inherit;
	position: relative;
}

.twd-site-footer::before {
	background: linear-gradient(90deg, transparent, rgba(185, 151, 91, 0.55), transparent);
	content: "";
	height: 1px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.twd-footer-inner {
	display: grid;
	gap: clamp(40px, 5vw, 72px);
	grid-template-columns: 1.3fr 2.1fr 1.1fr;
	margin: 0 auto;
	max-width: 1180px;
	padding: clamp(56px, 7vw, 88px) 24px clamp(44px, 5vw, 64px);
}

/* Brand */

.twd-footer-logo {
	display: inline-block;
	line-height: 0;
}

.twd-footer-logo img {
	filter: brightness(0) invert(1);
	height: auto;
	max-height: 56px;
	opacity: 0.95;
	width: auto;
}

.twd-footer-tagline {
	color: rgba(247, 244, 237, 0.7);
	font-size: 0.98rem;
	line-height: 1.8;
	margin: 22px 0 0;
	max-width: 38ch;
}

.twd-footer-social {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
}

.twd-footer-social-link {
	align-items: center;
	border: 1px solid rgba(247, 244, 237, 0.18);
	border-radius: 999px;
	color: rgba(247, 244, 237, 0.86);
	display: inline-flex;
	font-size: 0.86rem;
	gap: 9px;
	letter-spacing: 0.02em;
	padding: 10px 18px;
	text-decoration: none;
	transition:
		background-color 200ms ease,
		border-color 200ms ease,
		color 200ms ease,
		transform 200ms ease;
}

.twd-footer-social-link:hover,
.twd-footer-social-link:focus-visible {
	background: rgba(185, 151, 91, 0.14);
	border-color: rgba(185, 151, 91, 0.6);
	color: var(--twd-color-cream, #f7f4ed);
	transform: translateY(-2px);
}

.twd-footer-social-link .twd-social-icon {
	flex: none;
}

/* Columns */

.twd-footer-links {
	display: grid;
	gap: clamp(24px, 3vw, 40px);
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.twd-footer-heading {
	color: var(--twd-color-gold, #b9975b);
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: 1.2;
	margin: 0 0 22px;
	text-transform: uppercase;
}

.twd-footer-heading a {
	color: inherit;
	text-decoration: none;
	transition: color 200ms ease;
}

.twd-footer-heading a:hover,
.twd-footer-heading a:focus-visible {
	color: var(--twd-color-cream, #f7f4ed);
}

.twd-footer-menu {
	display: grid;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.twd-footer-menu li {
	margin: 0;
}

.twd-footer-menu a {
	color: rgba(247, 244, 237, 0.78);
	display: inline-block;
	font-size: 1rem;
	text-decoration: none;
	transition:
		color 200ms ease,
		transform 200ms ease;
}

.twd-footer-menu a:hover,
.twd-footer-menu a:focus-visible,
.twd-footer-menu .current-menu-item > a {
	color: var(--twd-color-cream, #f7f4ed);
	transform: translateX(4px);
}

.twd-footer-contact-list {
	display: grid;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.twd-footer-contact-list a {
	color: var(--twd-color-cream, #f7f4ed);
	font-size: 1.02rem;
	text-decoration: none;
	transition: color 200ms ease;
	word-break: break-word;
}

.twd-footer-contact-list a:hover,
.twd-footer-contact-list a:focus-visible {
	color: var(--twd-color-gold, #b9975b);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.twd-footer-note {
	color: rgba(247, 244, 237, 0.58);
	font-size: 0.92rem;
	line-height: 1.75;
	margin: 22px 0 0;
	max-width: 30ch;
}

.twd-site-footer a:focus-visible,
.twd-footer-logo:focus-visible {
	outline: 2px solid var(--twd-color-gold, #b9975b);
	outline-offset: 4px;
}

/* Astra's copyright bar becomes the closing strip of this footer. */

body.twd-navigation .site-footer,
body.twd-navigation .site-below-footer-wrap {
	background: var(--twd-color-navy, #071024);
}

body.twd-navigation .site-below-footer-wrap {
	border-top: 1px solid rgba(247, 244, 237, 0.1);
	padding-block: 22px;
}

body.twd-navigation .ast-footer-copyright,
body.twd-navigation .ast-footer-copyright p {
	color: rgba(247, 244, 237, 0.52);
	font-size: 0.85rem;
	letter-spacing: 0.02em;
	margin: 0;
}

body.twd-navigation .ast-footer-copyright a {
	color: rgba(247, 244, 237, 0.75);
}

/* Floating social rail */

.twd-social-float {
	bottom: 30%;
	display: grid;
	gap: 12px;
	left: clamp(12px, 1.8vw, 24px);
	position: fixed;
	z-index: 998;
}

.twd-social-float-link {
	align-items: center;
	backdrop-filter: blur(10px);
	background: rgba(7, 16, 36, 0.55);
	border: 1px solid rgba(247, 244, 237, 0.24);
	border-radius: 50%;
	box-shadow: 0 10px 24px rgba(7, 16, 36, 0.22);
	color: var(--twd-color-cream, #f7f4ed);
	display: flex;
	height: 46px;
	justify-content: center;
	position: relative;
	text-decoration: none;
	transition:
		background-color 220ms ease,
		border-color 220ms ease,
		color 220ms ease,
		transform 220ms ease;
	width: 46px;
}

.twd-social-float-link:hover,
.twd-social-float-link:focus-visible {
	background: var(--twd-color-gold, #b9975b);
	border-color: var(--twd-color-gold, #b9975b);
	color: var(--twd-color-navy, #071024);
	transform: translateX(3px) scale(1.06);
}

.twd-social-float-link:focus-visible {
	outline: 2px solid var(--twd-color-cream, #f7f4ed);
	outline-offset: 3px;
}

@media (max-width: 1024px) {
	.twd-footer-inner {
		gap: 44px;
		grid-template-columns: 1fr;
	}
}

@media (max-width: 782px) {
	.twd-social-float {
		bottom: 22%;
		gap: 10px;
		left: 12px;
	}

	.twd-social-float-link {
		height: 40px;
		width: 40px;
	}
}

@media (max-width: 640px) {
	.twd-footer-inner {
		gap: 40px;
	}

	.twd-footer-links {
		gap: 32px 24px;
		grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	}

	.twd-footer-tagline,
	.twd-footer-note {
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.twd-footer-social-link,
	.twd-footer-menu a,
	.twd-social-float-link {
		transition: none;
	}

	.twd-footer-social-link:hover,
	.twd-footer-social-link:focus-visible,
	.twd-footer-menu a:hover,
	.twd-footer-menu a:focus-visible,
	.twd-social-float-link:hover,
	.twd-social-float-link:focus-visible {
		transform: none;
	}
}

@media print {
	.twd-social-float {
		display: none;
	}
}
