/* ReFactory Footer for Elementor — layout. Colours/fonts come from the Elementor controls. */

.rf-footer {
	--rf-card-w: 48%;
	--rf-col2-w: 235px;
	--rf-card-bg: #111;
	--rf-card-r: 24px;
	--rf-notch-w: 230px;
	--rf-notch-h: 107px;
	--rf-notch-skew: 16deg;
	--rf-cols-top: 37px;
	--rf-pad-x: 32px;

	box-sizing: border-box;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	display: grid;
	grid-template-columns: var(--rf-card-w) var(--rf-col2-w) minmax(0, 1fr);
	column-gap: 70px;
	row-gap: 50px;
	align-items: start;
}

.rf-footer *,
.rf-footer *::before,
.rf-footer *::after {
	box-sizing: border-box;
}

.rf-footer :where(ul, p, h3) {
	margin: 0;
	padding: 0;
}

/* ------------------------------------------------------------ Card */

.rf-card {
	grid-column: 1;
	grid-row: 1 / span 2;
	position: relative;
	display: flex;
	min-height: 538px;
}

.rf-card__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

.rf-card__top {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	background: var(--rf-card-bg);
	border-radius: var(--rf-card-r);
}

.rf-card__bottom {
	display: none;
}

/* Notch version: top slab + lower-left slab with a slanted right edge */
.rf-has-notch .rf-card__top {
	bottom: calc(var(--rf-notch-h) - 1px);
	border-radius: var(--rf-card-r) var(--rf-card-r) var(--rf-card-r) 0;
}

.rf-has-notch .rf-card__bottom {
	display: block;
	position: absolute;
	left: 0;
	bottom: 0;
	width: calc(100% - var(--rf-notch-w));
	height: var(--rf-notch-h);
	background: var(--rf-card-bg);
	border-bottom-left-radius: var(--rf-card-r);
}

.rf-has-notch .rf-card__bottom::after {
	content: "";
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: calc(var(--rf-notch-h) + 60px);
	background: var(--rf-card-bg);
	border-bottom-right-radius: var(--rf-card-r);
	transform-origin: 100% 100%;
	transform: skewX(calc(var(--rf-notch-skew) * -1));
}

.rf-card__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 68px var(--rf-pad-x, 32px) 30px;
}

.rf-card__main {
	max-width: 100%;
}

.rf-logo {
	line-height: 0;
}

.rf-logo img {
	display: block;
}

.rf-logo__link {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
}

.rf-logo__text {
	display: inline-block;
	line-height: 1.1;
}

.rf-desc {
	max-width: 560px;
}

.rf-desc--2 {
	margin-top: 1.1em;
}

.rf-company {
	margin-top: 40px;
}

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

.rf-social {
	--rf-social-x: 0px;
	--rf-social-y: 0px;
	position: absolute;
	z-index: 2;
	right: 0;
	bottom: 0;
	width: var(--rf-notch-w);
	height: var(--rf-notch-h);
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translate(var(--rf-social-x), var(--rf-social-y));
}

.rf-footer:not(.rf-has-notch) .rf-social {
	width: auto;
	height: auto;
	right: 28px;
	bottom: 24px;
}

.rf-social a {
	display: inline-flex;
	line-height: 1;
	text-decoration: none;
	transition: color 0.25s ease;
}

.rf-social a i {
	line-height: 1;
}

/* --------------------------------------------------------- Columns */

.rf-col {
	min-width: 0;
	padding-top: var(--rf-cols-top);
	padding-left: var(--rf-pad-x);
	padding-right: var(--rf-pad-x);
}

.rf-col--nav      { grid-column: 2; grid-row: 1; }
.rf-col--news     { grid-column: 3; grid-row: 1; }
.rf-col--featured { grid-column: 2; grid-row: 2; padding-top: 0; }
.rf-col--contact  { grid-column: 3; grid-row: 2; padding-top: 0; }

.rf-heading {
	text-transform: none;
	font-weight: 500;
}

.rf-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rf-list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rf-list a {
	display: inline-block;
	text-decoration: none;
	cursor: pointer;
}

/* ------------------------------------------------------ Newsletter */

.rf-form__row {
	display: flex;
	align-items: stretch;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.rf-input {
	font: inherit;
}

.rf-footer .rf-form .rf-input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: auto;
	margin: 0;
	background-color: #141414;
	border: 0 solid transparent;
	box-shadow: none;
	outline: 0;
	appearance: none;
	-webkit-appearance: none;
	text-align: left;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.rf-input:focus {
	outline: 0;
	box-shadow: none;
}

.rf-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	background: transparent;
	color: #f1501d;
	border: 1.5px solid #f1501d;
	cursor: pointer;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.rf-btn__arrow {
	flex: 0 0 auto;
}

/* Everything in the newsletter column starts on the same left edge. */
.rf-footer .rf-col--news,
.rf-footer .rf-col--news .rf-form,
.rf-footer .rf-col--news .rf-tagline {
	text-align: left;
}

.rf-footer .rf-form {
	margin: 0;
	padding: 0;
	width: 100%;
}

.rf-footer .rf-form__row {
	margin-left: 0;
	margin-right: auto;
}

.rf-footer .rf-consent {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 10px;
	max-width: 440px;
	margin-left: 0;
	margin-right: 0;
	padding: 0;
	text-indent: 0;
	cursor: pointer;
}

.rf-footer .rf-form .rf-consent input[type="checkbox"] {
	flex: 0 0 auto;
	margin: 0.3em 0 0 0;
	padding: 0;
	width: 14px;
	height: 14px;
	min-width: 14px;
	position: static;
	transform: none;
	accent-color: #f1501d;
}

.rf-form--shortcode input[type="email"],
.rf-form--shortcode input[type="text"] {
	width: 100%;
}

/* --------------------------------------------- Letter animation */

.rf-fx .rf-w {
	display: inline-block;
	white-space: nowrap;
}

.rf-fx .rf-l {
	display: inline-block;
	white-space: pre;
	will-change: transform, opacity;
}

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

@media (max-width: 1024px) {
	.rf-footer {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
	.rf-card          { grid-column: 1 / -1; grid-row: auto; }
	.rf-col--nav      { grid-column: 1; grid-row: auto; padding-top: 0; }
	.rf-col--news     { grid-column: 2; grid-row: auto; padding-top: 0; }
	.rf-col--featured { grid-column: 1; grid-row: auto; }
	.rf-col--contact  { grid-column: 2; grid-row: auto; }
}

@media (max-width: 767px) {
	.rf-footer {
		grid-template-columns: minmax(0, 1fr);
	}
	.rf-card,
	.rf-col--nav,
	.rf-col--news,
	.rf-col--featured,
	.rf-col--contact {
		grid-column: 1;
	}
	/* Mobile: no notch. Card stacks, social icons sit in the flow under the company info. */
	.rf-footer .rf-card { flex-direction: column; min-height: 0; }
	.rf-footer .rf-card__inner { gap: 30px; }
	.rf-footer.rf-has-notch .rf-card__top { bottom: 0; border-radius: var(--rf-card-r); }
	.rf-footer.rf-has-notch .rf-card__bottom { display: none; }
	.rf-footer .rf-card .rf-social {
		position: relative;
		right: auto;
		bottom: auto;
		width: auto;
		height: auto;
		transform: none;
		justify-content: flex-start;
		padding: 0 var(--rf-pad-x, 28px) 28px;
		margin-top: -10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rf-fx .rf-l { animation: none !important; }
}

/* Animated letters always follow the colour of their link/text. */
.rf-fx .rf-w,
.rf-fx .rf-l {
	color: inherit;
}
