/*
 * Gspikes Newsletter — signup card and toast.
 *
 * Self-contained on purpose. The theme's Tailwind build is purged, so a
 * utility class invented here would not exist in the compiled stylesheet.
 * Everything is namespaced .gsnl- so it cannot collide with the theme.
 *
 * Inner elements are scoped under .gsnl-card rather than styled on their own
 * class. Elementor's global kit ships rules like `.elementor-kit-15 button`,
 * which at 0,1,1 outranks a bare `.gsnl-btn` at 0,1,0 and strips the button
 * back to unstyled text. Scoping takes these to 0,2,0 and wins without
 * resorting to !important.
 */

.gsnl-card {
	--gsnl-ink: #08080d;
	--gsnl-line: rgba(255, 255, 255, .09);
	--gsnl-text: #fff;
	--gsnl-muted: #8a8a99;
	--gsnl-faint: #5a5a68;
	--gsnl-brand: #ec3737;

	position: relative;
	overflow: hidden;
	margin: 3rem 0;
	border: 1px solid var(--gsnl-line);
	border-radius: 20px;
	background: var(--gsnl-ink);
	font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	isolation: isolate;
}

/* The one flourish: a soft brand-red bloom off the top-right corner. */
.gsnl-card .gsnl-card__glow {
	position: absolute;
	top: -55%;
	right: -20%;
	width: 70%;
	height: 200%;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(ellipse at center, rgba(236, 55, 55, .20) 0%, rgba(236, 55, 55, 0) 62%);
}

.gsnl-card .gsnl-card__inner { padding: 2.5rem 2.25rem; }
.gsnl-card--compact .gsnl-card__inner { padding: 1.9rem 1.75rem; }

.gsnl-card .gsnl-kicker {
	margin: 0 0 .85rem;
	padding: 0;
	font-size: .68rem;
	font-weight: 800;
	letter-spacing: .2em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--gsnl-brand);
}

.gsnl-card .gsnl-title {
	margin: 0 0 .6rem;
	padding: 0;
	font-size: clamp(1.45rem, 3.2vw, 1.95rem);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--gsnl-text);
}

.gsnl-card .gsnl-blurb {
	margin: 0 0 1.6rem;
	padding: 0;
	max-width: 46ch;
	font-size: .95rem;
	line-height: 1.6;
	color: var(--gsnl-muted);
}

.gsnl-card .gsnl-form {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.gsnl-card .gsnl-row {
	display: flex;
	gap: .6rem;
	align-items: stretch;
	max-width: 30rem;
}

.gsnl-card .gsnl-input {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	margin: 0;
	padding: .95rem 1.1rem;
	border: 1px solid var(--gsnl-line);
	border-radius: 11px;
	background: rgba(255, 255, 255, .04);
	color: var(--gsnl-text);
	font-family: inherit;
	font-size: .95rem;
	line-height: 1.3;
	box-shadow: none;
	transition: border-color .18s ease, background .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.gsnl-card .gsnl-input::placeholder { color: var(--gsnl-faint); opacity: 1; }

.gsnl-card .gsnl-input:focus {
	outline: none;
	border-color: var(--gsnl-brand);
	background: rgba(255, 255, 255, .06);
	box-shadow: none;
}

.gsnl-card .gsnl-btn {
	flex: 0 0 auto;
	width: auto;
	margin: 0;
	padding: .95rem 1.6rem;
	border: 0;
	border-radius: 11px;
	background: var(--gsnl-brand);
	background-image: none;
	color: #fff;
	font-family: inherit;
	font-size: .92rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: transform .18s ease, filter .18s ease;
}

.gsnl-card .gsnl-btn:hover { background: var(--gsnl-brand); filter: brightness(1.09); transform: translateY(-1px); }
.gsnl-card .gsnl-btn:active { transform: translateY(0); }
.gsnl-card .gsnl-btn[disabled] { opacity: .55; cursor: default; transform: none; filter: none; }

.gsnl-card .gsnl-note {
	margin: .85rem 0 0;
	padding: 0;
	font-size: .78rem;
	line-height: 1.5;
	color: var(--gsnl-faint);
}

.gsnl-card .gsnl-msg {
	margin: .85rem 0 0;
	padding: 0;
	font-size: .88rem;
	line-height: 1.5;
	color: var(--gsnl-text);
	display: none;
}

.gsnl-card .gsnl-msg.is-shown { display: block; }
.gsnl-card .gsnl-msg.is-bad { color: #ff9a9a; }

.gsnl-card .gsnl-form.is-done .gsnl-row,
.gsnl-card .gsnl-form.is-done .gsnl-note { display: none; }

.gsnl-card .gsnl-form.is-done .gsnl-msg {
	margin-top: 0;
	padding-left: 1.05rem;
	border-left: 2px solid var(--gsnl-brand);
	font-size: 1rem;
}

/* Honeypot and screen-reader-only label. */
.gsnl-card .gsnl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px; overflow: hidden;
}

.gsnl-card .gsnl-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	clip: rect(0 0 0 0); clip-path: inset(50%);
	overflow: hidden; white-space: nowrap;
}

@media (max-width: 560px) {
	.gsnl-card .gsnl-card__inner { padding: 1.9rem 1.35rem; }
	.gsnl-card .gsnl-row { flex-direction: column; }
	.gsnl-card .gsnl-btn { width: 100%; }
}

/* ---------------------------------------------------------------------- */
/* Site-wide placement: the block that sits above the footer on pages      */
/* where the in-content card does not appear.                             */
/* ---------------------------------------------------------------------- */

.gsnl-strip {
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* The in-content card takes its vertical rhythm from the article around it.
   Standing alone above the footer it needs its own. */
.gsnl-strip .gsnl-card {
	margin: 3.5rem 0;
}

@media (max-width: 560px) {
	.gsnl-strip { padding: 0 16px; }
	.gsnl-strip .gsnl-card { margin: 2.25rem 0; }
}

/* ---------------------------------------------------------------------- */
/* Toast shown after confirm / unsubscribe                                 */
/* ---------------------------------------------------------------------- */

.gsnl-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	gap: .8rem;
	max-width: min(30rem, calc(100vw - 32px));
	padding: 1rem 1.15rem;
	transform: translateX(-50%);
	border: 1px solid rgba(255, 255, 255, .10);
	border-radius: 14px;
	background: #0d0d14;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
	color: #fff;
	font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	font-size: .88rem;
	line-height: 1.5;
	animation: gsnl-rise .38s cubic-bezier(.16, .84, .44, 1) both;
}

.gsnl-toast .gsnl-toast__mark {
	flex: 0 0 auto;
	width: 8px; height: 8px;
	margin-top: .45rem;
	border-radius: 50%;
	background: #ec3737;
}

.gsnl-toast .gsnl-toast__text { flex: 1 1 auto; color: #c9c9d4; }
.gsnl-toast .gsnl-toast__text strong { color: #fff; }

.gsnl-toast .gsnl-toast__x {
	flex: 0 0 auto;
	margin: -.2rem -.3rem 0 0;
	padding: 0 .3rem;
	border: 0;
	background: none;
	color: #5a5a68;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.gsnl-toast .gsnl-toast__x:hover { color: #fff; }

@keyframes gsnl-rise {
	from { opacity: 0; transform: translate(-50%, 14px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.gsnl-toast { animation: none; }
	.gsnl-card .gsnl-btn { transition: none; }
}

/* ---------------------------------------------------------------------- */
/* Elementor global-kit override                                          */
/* ---------------------------------------------------------------------- */

/*
 * Elementor's kit styles every input on the site with a selector shaped like
 *   .elementor-kit-15 input:not([type="button"]):not([type="submit"])…
 * Each :not() carries the specificity of an attribute selector, so the rule
 * outruns any sane class chain and flattens the field back to square corners.
 *
 * Specificity cannot win this without an absurd selector, so these few
 * properties are forced. Kept to the visual ones only, and confined to this
 * one field, so nothing else on the site is affected.
 */
.gsnl-card .gsnl-input {
	border: 1px solid var(--gsnl-line) !important;
	border-radius: 11px !important;
	background-color: rgba(255, 255, 255, .04) !important;
	background-image: none !important;
	color: var(--gsnl-text) !important;
	padding: .95rem 1.1rem !important;
	box-shadow: none !important;
}

.gsnl-card .gsnl-input:focus {
	border-color: var(--gsnl-brand) !important;
	background-color: rgba(255, 255, 255, .06) !important;
	outline: none !important;
}

@media (max-width: 560px) {
	.gsnl-card .gsnl-btn { width: 100% !important; }
}
