/*
Theme Name: Calm Back with Gem
Theme URI: https://calmbackwithgem.co.uk
Description: Calm Back with Gem child theme. Single source of truth for brand. Bundled logo, brand fonts, restrained holographic accents (hero only), real header and footer. Built on Hello Elementor.
Author: Gemma Hurlstone
Author URI: https://calmbackwithgem.co.uk
Template: hello-elementor
Version: 2.0.0
Text Domain: calmback-with-gem
*/

/* ============================================================
   Brand variables
   ============================================================ */
:root {
	--cb-violet: #b56cf2;
	--cb-violet-deep: #8b3fcc;
	--cb-plum: #5a3e5b;
	--cb-gold: #c9a24d;
	--cb-cream: #efe9e4;
	--cb-cream-soft: #faf7f4;
	--cb-choc: #2f2a27;
	--cb-pink: #f0b3d8;
	--cb-peach: #f5c8a8;
	--cb-sage: #8faf9a;
	--cb-terracotta: #c46a4a;
	--cb-holo: linear-gradient(135deg, #b56cf2 0%, #f0b3d8 35%, #c9a24d 70%, #8b3fcc 100%);
	--cb-radius: 14px;
	--cb-radius-lg: 24px;
	--cb-shadow: 0 12px 36px rgba(90, 62, 91, 0.08);
	--cb-shadow-lg: 0 24px 60px rgba(90, 62, 91, 0.18);
}

/* ============================================================
   Body + base
   ============================================================ */
html { scroll-behavior: smooth; }

body {
	font-family: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.7;
	color: var(--cb-choc);
	background-color: var(--cb-cream-soft);
	-webkit-font-smoothing: antialiased;
}

::selection {
	background: var(--cb-violet);
	color: #fff;
}

img { max-width: 100%; height: auto; }

a {
	color: var(--cb-violet-deep);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
	transition: color 0.2s ease;
}
a:hover, a:focus { color: var(--cb-plum); }

/* ============================================================
   Typography lock (overrides Elementor)
   ============================================================ */
body, body p,
body .elementor-text-editor,
body .elementor-widget-text-editor,
body li, body span {
	font-family: 'Lexend', -apple-system, sans-serif !important;
	line-height: 1.7;
}

body h1, body h2, body h3, body h4, body h5, body h6,
body .elementor-heading-title,
body .elementor-widget-heading h1,
body .elementor-widget-heading h2,
body .elementor-widget-heading h3,
body .elementor-widget-heading h4 {
	font-family: 'Outfit', -apple-system, sans-serif !important;
	font-weight: 800 !important;
	letter-spacing: -0.02em !important;
	line-height: 1.1 !important;
	color: var(--cb-choc);
}

body h1, body h1.elementor-heading-title {
	font-weight: 900 !important;
	letter-spacing: -0.03em !important;
}

.cb-script, .cb-italic {
	font-family: 'Playfair Display', serif !important;
	font-style: italic !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
}

/* ============================================================
   Hide Hello Elementor's auto-rendered page title (we don't want "Home" above the hero)
   ============================================================ */
body.elementor-page .entry-title,
body.elementor-page .page-title,
body.elementor-page header.entry-header,
body.elementor-page .page-header,
body.elementor-page > .site > .site-content > article > header,
body.elementor-page article > header.entry-header {
	display: none !important;
}

/* ============================================================
   Hero — holographic, the focal glam moment
   ============================================================ */
body.home .elementor > .elementor-section:first-of-type {
	background: var(--cb-holo) !important;
	background-size: 300% 300% !important;
	animation: cbHoloShift 18s ease-in-out infinite !important;
	position: relative !important;
}

body.home .elementor-section:first-of-type::after {
	content: '✦';
	position: absolute;
	top: 50px;
	right: 9%;
	font-size: 3.2rem;
	color: var(--cb-gold);
	text-shadow: 0 0 20px rgba(201, 162, 77, 0.7);
	animation: cbSparkleA 5s ease-in-out infinite;
	z-index: 1;
	pointer-events: none;
}

body.home .elementor-section:first-of-type::before {
	content: '✦';
	position: absolute;
	bottom: 80px;
	left: 7%;
	font-size: 2rem;
	color: var(--cb-pink);
	text-shadow: 0 0 16px rgba(240, 179, 216, 0.8);
	animation: cbSparkleA 6s ease-in-out infinite 1s;
	z-index: 1;
	pointer-events: none;
}

@keyframes cbHoloShift {
	0%, 100% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
}

@keyframes cbSparkleA {
	0%, 100% { opacity: 0.6; transform: scale(1) rotate(0deg); }
	50% { opacity: 1; transform: scale(1.2) rotate(15deg); }
}

/* Hero text on holo: white with subtle shadow */
body.home .elementor-section:first-of-type h1,
body.home .elementor-section:first-of-type h1 .elementor-heading-title,
body.home .elementor-section:first-of-type p {
	color: #ffffff !important;
	text-shadow: 0 2px 12px rgba(47, 42, 39, 0.18) !important;
}

body.home .elementor-section:first-of-type p[style*="font-style:italic"],
body.home .elementor-section:first-of-type div[style*="font-style:italic"] {
	color: var(--cb-gold) !important;
}

/* ============================================================
   Sections — calm composition, three flavours only
   ============================================================ */
body .elementor-section[style*="background-color:#5a3e5b"],
body .elementor-section[data-settings*="5a3e5b"] {
	background-color: var(--cb-plum) !important;
}

body .elementor-section[style*="background-color:#b56cf2"],
body .elementor-section[data-settings*="b56cf2"] {
	background: linear-gradient(180deg, var(--cb-violet) 0%, var(--cb-violet-deep) 100%) !important;
}

body .elementor-section[style*="b56cf2"] h2,
body section[data-settings*="b56cf2"] h2 {
	color: #ffffff !important;
}

/* ============================================================
   Buttons — pill, violet, gold border on hover
   ============================================================ */
body .cb-btn,
body a.cb-btn,
body .elementor-button,
body button[type="submit"],
body .ff-btn-submit {
	background: var(--cb-violet) !important;
	color: #ffffff !important;
	border-radius: 999px !important;
	font-family: 'Outfit', sans-serif !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em !important;
	padding: 18px 36px !important;
	min-height: 56px !important;
	border: 2px solid var(--cb-violet) !important;
	box-shadow: 0 8px 24px rgba(139, 63, 204, 0.25) !important;
	transition: all 0.25s ease !important;
	text-decoration: none !important;
	display: inline-block !important;
	text-transform: none !important;
	cursor: pointer;
}

body .cb-btn:hover,
body a.cb-btn:hover,
body .elementor-button:hover,
body .ff-btn-submit:hover {
	background: var(--cb-violet-deep) !important;
	border-color: var(--cb-gold) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 12px 32px rgba(139, 63, 204, 0.4) !important;
}

/* ============================================================
   Cards — clean white, single accent line, holographic prices
   ============================================================ */
body .cb-card,
body .cb-offer-card {
	background: #ffffff !important;
	border-radius: 20px !important;
	padding: 32px 28px !important;
	box-shadow: var(--cb-shadow) !important;
	border-top: 4px solid var(--cb-violet) !important;
	position: relative !important;
}

body .cb-card .cb-price,
body .cb-offer-card .cb-price {
	background: var(--cb-holo) !important;
	background-size: 300% 300% !important;
	-webkit-background-clip: text !important;
	background-clip: text !important;
	-webkit-text-fill-color: transparent !important;
	animation: cbHoloShift 9s ease infinite !important;
	font-weight: 900 !important;
	font-size: 2.6rem !important;
	font-family: 'Outfit', sans-serif !important;
}

/* Subtle gold sparkle prefix on h2 section headings only (not h3, h4) */
body .elementor-widget-heading h2.elementor-heading-title::before {
	content: '✦ ';
	color: var(--cb-gold);
	text-shadow: 0 0 8px rgba(201, 162, 77, 0.35);
	margin-right: 4px;
}

/* ============================================================
   Forms
   ============================================================ */
body .ff-el-form-control,
body .fluentform input[type="text"],
body .fluentform input[type="email"],
body .cb-form input[type="text"],
body .cb-form input[type="email"] {
	border-radius: 999px !important;
	padding: 18px 24px !important;
	border: 2px solid rgba(181, 108, 242, 0.18) !important;
	font-family: 'Lexend', sans-serif !important;
	font-size: 1rem !important;
	min-height: 56px !important;
	background: #fff !important;
	width: 100%;
}

body .ff-el-form-control:focus,
body .cb-form input:focus {
	outline: none;
	border-color: var(--cb-violet) !important;
	box-shadow: 0 0 0 4px rgba(181, 108, 242, 0.15) !important;
}

/* ============================================================
   Kit (ConvertKit) embedded forms — brand match
   ============================================================ */
body .formkit-form,
body .seva-form,
body [data-uid] form {
	font-family: 'Lexend', sans-serif !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

body .formkit-form .formkit-header,
body .formkit-form .formkit-subheader {
	font-family: 'Outfit', sans-serif !important;
	color: var(--cb-choc) !important;
	font-weight: 800 !important;
}

body .formkit-form .formkit-subheader,
body .formkit-form .formkit-text {
	font-family: 'Lexend', sans-serif !important;
	font-weight: 400 !important;
	color: var(--cb-choc) !important;
}

body .formkit-form .formkit-input,
body .formkit-form input[type="text"],
body .formkit-form input[type="email"],
body .formkit-form input[type="tel"] {
	background: #ffffff !important;
	border: 2px solid var(--cb-choc) !important;
	border-radius: 999px !important;
	font-family: 'Lexend', sans-serif !important;
	font-size: 1rem !important;
	color: var(--cb-choc) !important;
	padding: 16px 22px !important;
	min-height: 56px !important;
	width: 100% !important;
	box-shadow: none !important;
}

body .formkit-form .formkit-input::placeholder {
	color: rgba(47, 42, 39, 0.55) !important;
}

body .formkit-form .formkit-input:focus {
	outline: none !important;
	border-color: var(--cb-violet) !important;
	box-shadow: 0 0 0 4px rgba(181, 108, 242, 0.18) !important;
}

body .formkit-form .formkit-submit,
body .formkit-form button[type="submit"] {
	background: var(--cb-violet) !important;
	color: #ffffff !important;
	border: 2px solid var(--cb-violet) !important;
	border-radius: 999px !important;
	font-family: 'Outfit', sans-serif !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em !important;
	padding: 18px 36px !important;
	min-height: 56px !important;
	cursor: pointer !important;
	transition: all 0.25s ease !important;
	box-shadow: 0 8px 24px rgba(139, 63, 204, 0.25) !important;
}

body .formkit-form .formkit-submit:hover,
body .formkit-form button[type="submit"]:hover {
	background: var(--cb-violet-deep) !important;
	border-color: var(--cb-gold) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 12px 32px rgba(139, 63, 204, 0.4) !important;
}

body .formkit-form .formkit-disclaimer,
body .formkit-form .formkit-powered-by-convertkit-container {
	font-family: 'Lexend', sans-serif !important;
	font-size: 0.78rem !important;
	color: rgba(47, 42, 39, 0.55) !important;
}

/* Footer Kit form: smaller, fits the column */
.cb-site-footer .cb-footer-form .formkit-form {
	max-width: 100%;
}

.cb-site-footer .cb-footer-form .formkit-input {
	background: rgba(255, 255, 255, 0.95) !important;
	border-color: rgba(239, 233, 228, 0.4) !important;
	color: var(--cb-choc) !important;
}

.cb-site-footer .cb-footer-form .formkit-submit {
	width: 100% !important;
	margin-top: 8px !important;
}

/* ============================================================
   Site header (overrides Hello Elementor)
   ============================================================ */
.cb-site-header {
	background: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	padding: 16px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	border-bottom: 1px solid rgba(181, 108, 242, 0.12);
	z-index: 100;
	flex-wrap: wrap;
	position: sticky;
	top: 0;
}

.cb-site-header .cb-brand-link {
	display: flex;
	align-items: center;
	text-decoration: none;
	line-height: 0;
}

.cb-site-header .cb-logo-img {
	height: 110px;
	width: auto;
	max-width: 380px;
	display: block;
}

.cb-site-header .cb-brand-fallback {
	font-family: 'Outfit', sans-serif;
	font-weight: 900;
	font-size: 1.6rem;
	color: var(--cb-plum);
	text-decoration: none;
	letter-spacing: -0.02em;
}

.cb-site-header .cb-brand-fallback .cb-script {
	color: var(--cb-violet);
}

.cb-site-nav ul {
	display: flex;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
	align-items: center;
}

.cb-site-nav a {
	font-family: 'Outfit', sans-serif !important;
	font-weight: 600 !important;
	font-size: 1rem !important;
	color: var(--cb-choc) !important;
	text-decoration: none !important;
	padding: 8px 0 !important;
	position: relative;
	transition: color 0.2s ease;
}

.cb-site-nav a::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--cb-violet);
	border-radius: 999px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.cb-site-nav a:hover { color: var(--cb-violet-deep) !important; }
.cb-site-nav a:hover::after { transform: scaleX(1); }

.cb-site-nav li:last-child a {
	background: var(--cb-violet) !important;
	color: #fff !important;
	padding: 10px 22px !important;
	border-radius: 999px !important;
	font-weight: 700 !important;
}
.cb-site-nav li:last-child a::after { display: none; }
.cb-site-nav li:last-child a:hover {
	background: var(--cb-violet-deep) !important;
	color: #fff !important;
}

/* ============================================================
   Footer (overrides Hello Elementor)
   ============================================================ */
.cb-site-footer {
	background: linear-gradient(135deg, var(--cb-plum) 0%, var(--cb-choc) 100%);
	color: var(--cb-cream);
	padding: 90px 32px 36px;
	margin-top: 0;
	position: relative;
}

.cb-site-footer::before {
	content: '✦ ✦ ✦';
	position: absolute;
	top: 36px;
	left: 50%;
	transform: translateX(-50%);
	color: var(--cb-gold);
	letter-spacing: 28px;
	font-size: 1.1rem;
	opacity: 0.55;
}

.cb-site-footer .cb-footer-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
	gap: 48px;
}

.cb-site-footer h3 {
	font-family: 'Outfit', sans-serif;
	font-weight: 700;
	color: var(--cb-gold);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.85rem;
	margin: 0 0 16px;
}

.cb-site-footer a {
	color: var(--cb-cream);
	text-decoration: none;
	font-family: 'Lexend', sans-serif;
	font-size: 0.98rem;
	line-height: 2;
	transition: color 0.2s ease;
}

.cb-site-footer a:hover { color: var(--cb-pink); }

.cb-site-footer .cb-tagline {
	font-family: 'Playfair Display', serif;
	font-style: italic;
	color: var(--cb-pink);
	font-size: 1.25rem;
	margin: 0 0 14px;
	line-height: 1.4;
}

.cb-site-footer .cb-cta {
	display: inline-block;
	margin-top: 14px;
	padding: 12px 24px;
	background: rgba(201, 162, 77, 0.15);
	border: 2px solid var(--cb-gold);
	border-radius: 999px;
	font-family: 'Outfit', sans-serif !important;
	font-weight: 700 !important;
	font-size: 0.9rem !important;
	color: var(--cb-gold) !important;
	letter-spacing: 0.02em;
}

.cb-site-footer .cb-cta:hover {
	background: var(--cb-gold);
	color: var(--cb-choc) !important;
}

.cb-site-footer .cb-copyright {
	text-align: center;
	margin-top: 56px;
	padding-top: 28px;
	border-top: 1px solid rgba(239, 233, 228, 0.15);
	font-family: 'Lexend', sans-serif;
	font-size: 0.85rem;
	opacity: 0.65;
}

/* ============================================================
   Hello Elementor: hide its default header/footer to avoid duplicates
   ============================================================ */
body .site-header.site-header-inline,
body header.site-header,
body footer.site-footer {
	display: none !important;
}

/* ============================================================
   Mobile + reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media (max-width: 900px) {
	.cb-site-header { flex-direction: column; gap: 14px; padding: 14px 20px; }
	.cb-site-header .cb-logo-img { height: 80px; }
	.cb-site-nav ul { gap: 20px; justify-content: center; }
	.cb-site-footer { padding: 70px 24px 32px; }
	.cb-site-footer .cb-footer-inner { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 768px) {
	body { font-size: 17px; }
	body h1, body h1.elementor-heading-title {
		font-size: clamp(2rem, 8vw, 2.8rem) !important;
	}
	body h2, body h2.elementor-heading-title {
		font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
	}
	body .elementor-button { width: 100%; }
}
