/**
 * Social Tap child theme styles.
 *
 * Only what Elementor has no control for lives here: the self-hosted fonts, the platinum
 * material, the brushed-silver and grain textures, gradient and outlined headline text,
 * Xpro header/footer fixes and the contact form layout. Colours come from the Kit
 * (--e-global-color-*) so Site Settings stays the single place to change them.
 * Elements opt in through CSS classes set in Elementor (Advanced > CSS Classes).
 *
 * @package SocialTap_Child
 */

/* ---------- 1. Self-hosted fonts (variable: Sora wght 100..800, Archivo wght 100..900 wdth 62..125) ---------- */

@font-face {
	font-family: "Sora";
	src: url("../fonts/sora.woff2") format("woff2-variations"), url("../fonts/sora.woff2") format("woff2");
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("../fonts/archivo.woff2") format("woff2-variations"), url("../fonts/archivo.woff2") format("woff2");
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Great Vibes";
	src: url("../fonts/greatvibes.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* ---------- 2. Tokens and base ---------- */

:root {
	--st-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	--st-plat: linear-gradient(135deg, #f8f9fb 0%, #c3c8d0 42%, #eef0f3 68%, #a4aab4 100%);
	--st-plat-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 30px -12px rgba(220, 225, 232, 0.5);
	--st-plat-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 40px -10px rgba(220, 225, 232, 0.7);
	--st-focus: #f3f4f6;
	--st-header-h: 72px;
}

/*
 * Xpro's closed menu panel is fixed and translated off-screen to the right, which Chrome counts
 * as page width (a sideways scroll on phones). Clip at the root; "hidden" is the fallback for
 * browsers without "clip".
 */
html {
	overflow-x: hidden;
	overflow-x: clip;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--st-header-h) + 16px + var(--wp-admin--admin-bar--height, 0px));
	-webkit-text-size-adjust: 100%;
}

body {
	background-color: var(--e-global-color-secondary, #17191d);
	color: var(--e-global-color-text, #a6acb6);
	font-stretch: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

/* Film grain over the page ground (decorative; content sits above it). */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0.05;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-main,
body > footer,
.xpro-theme-builder-footer {
	position: relative;
	z-index: 1;
}

img {
	max-width: 100%;
}

:focus-visible {
	outline: 2px solid var(--st-focus);
	outline-offset: 3px;
	border-radius: 6px;
}

.st-silver :focus-visible {
	outline-color: var(--e-global-color-silverink, #15171b);
}

/* Hello's .page-content underlines every link; Elementor buttons, menus and link containers stay plain. */
.page-content .elementor a,
.xpro-theme-builder-header a,
.xpro-theme-builder-footer a {
	text-decoration: none;
}

/* Inline links in running text stay underlined, in the text's own colour. */
.elementor .elementor-widget-text-editor a,
.page-content .elementor .elementor-widget-text-editor a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* As the design: balanced line breaks for headings (Elementor has no control for it). */
.elementor-heading-title {
	text-wrap: balance;
}

.screen-reader-text:focus {
	z-index: 100000;
}

/* ---------- 3. Buttons: the platinum material and the press ---------- */

.st-btn .elementor-button {
	transition: transform 0.2s var(--st-ease), background-color 0.2s, box-shadow 0.2s, color 0.2s;
	white-space: nowrap;
}

.st-btn .elementor-button:active {
	transform: scale(0.97);
}

.st-btn-plat .elementor-button {
	background-image: var(--st-plat);
	box-shadow: var(--st-plat-shadow);
}

.st-btn-plat .elementor-button:hover,
.st-btn-plat .elementor-button:focus-visible {
	background-image: var(--st-plat);
	box-shadow: var(--st-plat-shadow-hover);
}

/* ---------- 4. Section grounds ---------- */

/* Hero: soft light from the upper right, behind the content. */
.st-hero {
	isolation: isolate;
}

.st-hero::after {
	content: "";
	position: absolute;
	inset: -72px 0 auto;
	height: min(1000px, 100%);
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(55% 60% at 74% 38%, rgba(214, 220, 230, 0.17), transparent 70%),
		radial-gradient(40% 40% at 10% 0%, rgba(214, 220, 230, 0.08), transparent 70%);
}

/* Brushed silver: the gradient is the container's own background (Kit colours); this adds the brush lines. */
.st-silver {
	isolation: isolate;
}

.st-silver::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	opacity: 0.55;
	background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px 4px);
}

/* ---------- 5. Headline treatments ---------- */

/* Hero H1: metallic text. */
.st-hero-title .elementor-heading-title {
	background-image: linear-gradient(170deg, #fff 0%, #e9ecef 38%, #aeb4bd 72%, #e4e7eb 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* Step numerals: outlined, no fill. */
.st-numeral .elementor-heading-title {
	-webkit-text-fill-color: transparent;
	-webkit-text-stroke: 1px rgba(236, 238, 242, 0.45);
	font-variant-numeric: tabular-nums;
}

.st-tabular .elementor-heading-title,
.st-tabular {
	font-variant-numeric: tabular-nums;
}

/* ---------- 6. Hero assurance list ---------- */

/* Icon and text both start at the top, so a two-line item keeps its tick beside the first line. */
.st-assure {
	--icon-vertical-align: flex-start;
	--icon-vertical-offset: 4px;
}

@media (max-width: 767px) {

	.st-assure .elementor-icon-list-items.elementor-inline-items {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 10px 14px;
	}

	.st-assure .elementor-icon-list-items.elementor-inline-items > .elementor-icon-list-item {
		align-items: flex-start;
		margin: 0;
	}

	.st-assure .elementor-icon-list-icon {
		margin-top: 3px;
	}
}

/* ---------- 7. Cards, rows and photos ---------- */

/* Path rows (silver cards): the product name underlines on hover. */
.st-row:is(:hover, :focus-visible) .st-row-title .elementor-heading-title {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Product, work and portrait photos keep their ratio and crop to fill. */
.st-ph,
.st-work {
	overflow: hidden;
}

.st-ph img,
.st-work img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.st-ph-wide img {
	aspect-ratio: 16 / 10;
}

.st-ph img {
	transition: transform 0.8s var(--st-ease);
}

.st-prod:hover .st-ph img {
	transform: scale(1.035);
}

.st-portrait {
	aspect-ratio: 4 / 5;
}

/* Product price: "$75" with a quiet "each". */
.st-price-text p {
	margin: 0;
}

.st-price-text small {
	margin-inline-start: 4px;
	color: var(--e-global-color-text, #a6acb6);
	font-size: 13px;
	font-weight: 400;
}

/* Links in running text on silver sections use the silver ink. */
.elementor .st-silver .elementor-widget-text-editor a,
.page-content .elementor .st-silver .elementor-widget-text-editor a {
	color: var(--e-global-color-silverink, #15171b);
}

/* ---------- 8. FAQ (nested accordion with class st-faq) ---------- */

.st-faq summary.e-n-accordion-item-title {
	list-style: none;
}

.st-faq summary.e-n-accordion-item-title::-webkit-details-marker {
	display: none;
}

/* The "+" in a 28px ring turns into an "x" when the answer is open. */
.st-faq .e-n-accordion-item-title-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 50%;
	transition: transform 0.3s var(--st-ease);
}

.st-faq details[open] > summary .e-n-accordion-item-title-icon {
	transform: rotate(45deg);
}

.st-faq .e-n-accordion-item-title-icon > span {
	display: grid;
	place-items: center;
}

/* ---------- 9. Contact list ---------- */

.st-contact-list .elementor-icon-list-item > a:is(:hover, :focus-visible) .elementor-icon-list-text {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ---------- 10. Contact form (WPForms "Base styling only"; colours are widget settings bound to the Kit) ---------- */

.st-form .wpforms-container {
	margin: 0;
}

.st-form .wpforms-field-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.st-form .wpforms-field {
	margin: 0;
	padding: 0;
}

.st-form .wpforms-field-textarea,
.st-form .wpforms-field.st-full {
	grid-column: 1 / -1;
}

.st-form .wpforms-field-label {
	margin: 0 0 7px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
}

.st-form .wpforms-required-label {
	display: none;
}

.st-form :is(input[type="text"], input[type="email"], textarea) {
	width: 100%;
	max-width: none;
	height: auto;
	padding: 13px 14px;
	border: 1px solid var(--e-global-color-line2, rgba(236, 238, 242, 0.18));
	border-radius: 12px;
	background-color: var(--e-global-color-plate2, #262a2f);
	color: var(--e-global-color-primary, #f1f3f5);
	font: inherit;
	font-size: 16px;
	line-height: 1.5;
	transition: border-color 0.2s, background-color 0.2s;
}

.st-form textarea {
	min-height: 96px;
	resize: vertical;
}

.st-form :is(input[type="text"], input[type="email"], textarea):focus {
	outline: none;
	border-color: rgba(240, 242, 246, 0.6);
	background-color: var(--e-global-color-plate3, #2e3238);
}

.st-form :is(input, textarea).wpforms-error {
	border-color: var(--e-global-color-alert, #e5484d);
}

.st-form label.wpforms-error,
.st-form em.wpforms-error {
	display: block;
	margin-top: 6px;
	color: var(--e-global-color-error, #ff8a8e);
	font-size: 13px;
	font-style: normal;
}

.st-form .wpforms-submit-container {
	margin: 16px 0 0;
	padding: 0;
}

.st-form button[type="submit"].wpforms-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 52px;
	padding: 0 26px;
	border: 0;
	border-radius: 999px;
	background-color: var(--e-global-color-accent, #dce0e6);
	background-image: var(--st-plat);
	box-shadow: var(--st-plat-shadow);
	color: var(--e-global-color-onplat, #0a0b0d);
	font-family: var(--e-global-typography-accent-font-family, "Archivo"), sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.2s var(--st-ease), box-shadow 0.2s;
}

.st-form button[type="submit"].wpforms-submit:hover,
.st-form button[type="submit"].wpforms-submit:focus-visible {
	box-shadow: var(--st-plat-shadow-hover);
}

.st-form button[type="submit"].wpforms-submit:active {
	transform: scale(0.97);
}

.st-form .wpforms-confirmation-container-full,
.st-form div[submit-success] > .wpforms-confirmation-container-full:not(.wpforms-redirection-message) {
	margin: 0;
	padding: 18px 20px;
	border: 1px solid var(--e-global-color-line2, rgba(236, 238, 242, 0.18));
	border-radius: 12px;
	background: var(--e-global-color-plate2, #262a2f);
	color: var(--e-global-color-primary, #f1f3f5);
}

.st-form .wpforms-confirmation-container-full p:last-child {
	margin: 0;
}

@media (max-width: 767px) {

	.st-form .wpforms-field-container {
		grid-template-columns: 1fr;
	}
}

/* ---------- 11. Header (Xpro Theme Builder template "Social Tap Header") ---------- */

.xpro-theme-builder-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 40;
}

/* Glass bar: the tint is the container's background; this adds the blur. */
.st-glass {
	-webkit-backdrop-filter: saturate(140%) blur(18px);
	backdrop-filter: saturate(140%) blur(18px);
}

/* Logos sit flush in their box (no line-box gap under the image), so they centre on the bar. */
.elementor-widget-xpro-site-logo .xpro-site-logo img {
	vertical-align: top;
}

/* Desktop links stay on one line. */
.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-navbar-nav {
	flex-wrap: nowrap;
}

/* Cart pill: bag icon and the count badge the shop plugin inserts. */
.st-cart .xpro-elementor-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
}

/* "Cart" stays the link's accessible name but is not shown (the design shows the bag and the count). */
.st-cart .xpro-button-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.st-cart-count {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--st-plat);
	color: var(--e-global-color-onplat, #0a0b0d);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 1024px) {

	/* Two-line menu toggle, as in the design; it turns into an "x" while the panel is open. */
	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu button.xpro-elementor-horizontal-menu-toggler {
		position: relative;
		display: inline-grid;
		place-items: center;
		width: 40px;
		height: 40px;
		padding: 0;
		border: 0;
		border-radius: 999px;
		background: transparent;
		color: var(--e-global-color-primary, #f1f3f5);
	}

	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-menu-toggler > :is(i, svg) {
		display: none;
	}

	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-menu-toggler::before,
	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-menu-toggler::after {
		content: "";
		position: absolute;
		left: 50%;
		top: 50%;
		width: 16px;
		height: 1.8px;
		border-radius: 2px;
		background-color: currentcolor;
		transition: transform 0.25s var(--st-ease);
	}

	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-menu-toggler::before {
		transform: translate(-50%, -4px);
	}

	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-menu-toggler::after {
		transform: translate(-50%, 4px);
	}

	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-navbar-wrapper.active ~ .xpro-elementor-horizontal-menu-toggler-wrapper .xpro-elementor-horizontal-menu-toggler::before {
		transform: translate(-50%, 0) rotate(45deg);
	}

	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-navbar-wrapper.active ~ .xpro-elementor-horizontal-menu-toggler-wrapper .xpro-elementor-horizontal-menu-toggler::after {
		transform: translate(-50%, 0) rotate(-45deg);
	}

	/* The panel drops under the bar and covers the page; the toggle stays usable. */
	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu :is(.xpro-elementor-horizontal-menu-responsive-tablet, .xpro-elementor-horizontal-menu-responsive-mobile) {
		inset-block-start: calc(var(--wp-admin--admin-bar--height, 0px) + var(--st-header-h) + 1px);
		height: calc(100vh - var(--st-header-h) - 1px - var(--wp-admin--admin-bar--height, 0px));
		height: calc(100dvh - var(--st-header-h) - 1px - var(--wp-admin--admin-bar--height, 0px));
	}

	/* The toggle also closes the panel, so Xpro's separate close button and overlay stay hidden. */
	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-menu-close,
	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu .xpro-elementor-horizontal-menu-overlay {
		display: none;
	}

	.xpro-theme-builder-header .elementor-widget-xpro-horizontal-menu :is(.xpro-elementor-horizontal-menu-responsive-tablet, .xpro-elementor-horizontal-menu-responsive-mobile) .xpro-elementor-horizontal-navbar-nav {
		padding-top: 0;
	}

	/* While the panel is open the page behind it does not scroll (st-header.js sets the class). */
	html.st-menu-open {
		overflow: hidden;
		scrollbar-gutter: stable;
	}
}

/* ---------- 12. Footer (Xpro Theme Builder template "Social Tap Footer") ---------- */

/* Footer link lists: the horizontal menu widget stacked as a column. */
.st-foot-menu .xpro-elementor-horizontal-navbar-nav {
	flex-direction: column;
	align-items: flex-start;
	flex-wrap: nowrap;
	gap: 10px;
}

.st-foot-menu .xpro-elementor-horizontal-navbar-nav > li > a {
	padding: 0;
}

/* ---------- 13. Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
