/* -------------------------------------------------------------------------------- */
/*	Stunning Conversion
/*	Sticky header, hero, calculator, in-post CTAs, popup, footer band.
/*	Brand colors (--stn-brand, --stn-brand-dark, --stn-accent) are set inline
/*	from the Customizer.
/* -------------------------------------------------------------------------------- */


:root {
	--stn-brand: #4f46e5;
	--stn-brand-dark: #3d36b3;
	--stn-accent: #059669;
	--stn-danger: #dc2626;
	--stn-ink: #0f172a;
	--stn-muted: #475569;
	--stn-card: #fff;
	--stn-surface: #f5f6fa;
	--stn-border: #e4e7ee;
	--stn-border-strong: #cfd5e1;
	--stn-input-bg: #fff;
	--stn-header-bg: rgba( 255, 255, 255, 0.92 );
	--stn-band: #0f172a;
	--stn-radius: 16px;
	--stn-header-h: 76px;
	--stn-shadow: 0 1px 2px rgba( 15, 23, 42, 0.06 ), 0 12px 32px -12px rgba( 15, 23, 42, 0.18 );
}

.dark-mode {
	--stn-ink: #fff;
	--stn-muted: rgba( 255, 255, 255, 0.72 );
	--stn-card: #262626;
	--stn-surface: rgba( 255, 255, 255, 0.06 );
	--stn-border: rgba( 255, 255, 255, 0.12 );
	--stn-border-strong: rgba( 255, 255, 255, 0.24 );
	--stn-input-bg: rgba( 255, 255, 255, 0.04 );
	--stn-header-bg: rgba( 29, 29, 29, 0.92 );
	--stn-band: #000;
	--stn-shadow: 0 12px 32px -12px rgba( 0, 0, 0, 0.6 );
}

/* Hamilton's height: 100% on body caps how far the sticky header can travel */
body {
	height: auto;
}

.stn-modal-open,
.stn-modal-open body {
	overflow: hidden;
}

.stn-has-bar body {
	padding-bottom: 76px;
}


/* Shared type ----------------------------------- */

.stn-eyebrow {
	color: var( --stn-brand );
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
	margin: 0 0 12px;
	text-transform: uppercase;
}

.dark-mode .stn-eyebrow {
	color: inherit;
	opacity: 0.8;
}

.stn-display {
	color: var( --stn-ink );
	font-size: clamp( 36px, 5vw, 60px );
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1.05;
	margin: 0 0 20px;
}

.stn-display--small {
	font-size: clamp( 30px, 3.6vw, 44px );
}

.stn-lede {
	color: var( --stn-muted );
	font-size: 20px;
	line-height: 1.5;
	margin: 0;
	max-width: 34em;
}

.stn-lede p {
	margin: 0;
}

.stn-section-title {
	color: var( --stn-muted );
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}


/* Buttons --------------------------------------- */

.stn-btn,
.dark-mode .stn-btn {
	align-items: center;
	background-color: var( --stn-brand );
	border: 0;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba( 15, 23, 42, 0.12 ), 0 8px 20px -8px var( --stn-brand );
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	gap: 0.5em;
	justify-content: center;
	line-height: 1.2;
	padding: 14px 22px;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	white-space: nowrap;
}

.stn-btn:hover,
.stn-btn:focus-visible {
	background-color: var( --stn-brand-dark );
	color: #fff;
	text-decoration: none;
	transform: translateY( -1px );
}

.stn-btn:focus-visible,
.stn-field:focus-within {
	outline: 3px solid color-mix( in srgb, var( --stn-brand ) 35%, transparent );
	outline-offset: 2px;
}

.stn-btn--large {
	font-size: 18px;
	padding: 18px 26px;
}

.stn-btn--block {
	display: flex;
	white-space: normal;
	width: 100%;
}

.stn-btn--small {
	font-size: 15px;
	padding: 10px 16px;
}


/* Fields ---------------------------------------- */

.stn-field {
	align-items: center;
	background: var( --stn-input-bg );
	border: 1.5px solid var( --stn-border-strong );
	border-radius: 10px;
	color: var( --stn-ink );
	display: flex;
	transition: border-color 0.15s ease;
}

.stn-field:focus-within {
	border-color: var( --stn-brand );
}

.stn-field input[type="text"],
.stn-field input[type="number"],
.dark-mode .stn-field input[type="text"],
.dark-mode .stn-field input[type="number"] {
	-moz-appearance: textfield;
	background: transparent;
	border: 0;
	color: inherit;
	font-size: 18px;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	margin: 0;
	min-width: 0;
	outline: none;
	padding: 13px 12px;
	width: 100%;
}

.stn-field input::-webkit-outer-spin-button,
.stn-field input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.stn-field--money input[type="text"] {
	padding-left: 4px;
}

.stn-field__prefix,
.stn-field__suffix {
	color: var( --stn-muted );
	font-size: 18px;
	font-weight: 600;
}

.stn-field__prefix { padding-left: 14px; }
.stn-field__suffix { padding-right: 14px; }


/* Trust points ---------------------------------- */

.stn-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
}

.stn-trust li {
	color: var( --stn-muted );
	font-size: 14px;
	line-height: 1.4;
	margin: 0;
}

.stn-trust li:before {
	color: var( --stn-accent );
	content: "\2713";
	font-weight: 700;
	margin-right: 6px;
}

.stn-trust--center {
	justify-content: center;
}


/* -------------------------------------------------------------------------------- */
/*	Announcement bar & sticky header
/* -------------------------------------------------------------------------------- */


.stn-announcement {
	background: var( --stn-band );
	color: #fff;
	padding: 10px 48px;
	position: relative;
	text-align: center;
}

.stn-announcement[hidden] {
	display: none;
}

.stn-announcement__text {
	font-size: 15px;
	line-height: 1.4;
	margin: 0;
}

.stn-announcement__text a {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.stn-announcement__text a:hover {
	text-decoration: underline;
}

.stn-announcement__close,
.dark-mode .stn-announcement__close,
.stn-mobile-bar__close,
.dark-mode .stn-mobile-bar__close {
	background: transparent;
	color: inherit;
	cursor: pointer;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	opacity: 0.7;
	padding: 6px 10px;
}

.stn-announcement__close {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY( -50% );
}

.stn-announcement__close:hover,
.stn-mobile-bar__close:hover {
	opacity: 1;
}

.stn-header-bar {
	backdrop-filter: saturate( 180% ) blur( 10px );
	-webkit-backdrop-filter: saturate( 180% ) blur( 10px );
	background: var( --stn-header-bg );
	border-bottom: 1px solid var( --stn-border );
	position: sticky;
	top: 0;
	z-index: 10000;
}

.admin-bar .stn-header-bar {
	top: 32px;
}

.stn-header-bar .site-header,
.wp-custom-logo .stn-header-bar .site-header {
	align-items: center;
	display: flex;
	gap: 24px;
	min-height: var( --stn-header-h );
	padding: 12px 0;
	z-index: auto;
}

.stn-header-bar .site-title {
	flex: 0 1 auto;
	margin-right: auto;
	min-width: 0;
}

.stn-header-bar .site-header .custom-logo {
	background-image: none !important;
	max-height: none;
	max-width: 220px;
}

.stn-header-bar .site-header .custom-logo img {
	height: 40px;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
	visibility: visible;
	width: auto;
}

.stn-header-bar .alt-nav-wrapper {
	margin-left: 0;
}

.stn-header-bar .alt-nav {
	margin-top: 0;
}

.stn-header-bar .alt-nav > li {
	font-size: 16px;
}

.stn-header-cta {
	flex: 0 0 auto;
	font-size: 15px;
	padding: 11px 18px;
}

.stn-header-cta__short {
	display: none;
}

.stn-header-bar .nav-toggle {
	flex: 0 0 auto;
	position: relative;
	right: auto;
	top: auto;
	width: 30px;
}

.stn-progress {
	bottom: -1px;
	height: 3px;
	left: 0;
	position: absolute;
	right: 0;
}

.stn-progress__bar {
	background: var( --stn-brand );
	display: block;
	height: 100%;
	transform: scaleX( 0 );
	transform-origin: left center;
}

/* The menu overlay sits under the sticky header */
.site-nav,
.wp-custom-logo .site-nav {
	margin-top: 0;
	padding-top: calc( var( --stn-header-h ) + 60px ) !important;
}

.stn-nav-cta {
	border-top: 1px solid var( --stn-border );
	clear: both;
	margin-top: 60px;
	padding-top: 40px;
}

.stn-nav-cta p {
	color: var( --stn-ink );
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin: 0 0 16px;
}

#site-content {
	padding-top: 72px;
}

.stn-has-hero #site-content {
	padding-top: 0;
}


/* -------------------------------------------------------------------------------- */
/*	Homepage hero
/* -------------------------------------------------------------------------------- */


.stn-hero {
	background:
		radial-gradient( 1200px 480px at 85% -10%, color-mix( in srgb, var( --stn-brand ) 16%, transparent ), transparent 70% ),
		radial-gradient( 800px 400px at -10% 110%, color-mix( in srgb, var( --stn-accent ) 10%, transparent ), transparent 70% );
	border-bottom: 1px solid var( --stn-border );
	padding: 88px 0 96px;
}

.stn-hero__inner {
	align-items: center;
	display: grid;
	gap: 64px;
	grid-template-columns: 1.15fr 1fr;
}

.stn-hero__form .stn-mini {
	background: var( --stn-card );
	border: 1px solid var( --stn-border );
	border-radius: 20px;
	box-shadow: var( --stn-shadow );
	padding: 28px;
}

.stn-posts-heading {
	margin-bottom: 32px;
	margin-top: 72px;
}


/* -------------------------------------------------------------------------------- */
/*	Mini form (single MRR field that opens the calculator)
/* -------------------------------------------------------------------------------- */


.stn-mini {
	margin: 0;
}

.stn-mini__label {
	color: var( --stn-ink );
	display: block;
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 10px;
}

.stn-mini__row {
	display: flex;
	gap: 10px;
}

.stn-mini__row .stn-field {
	flex: 1 1 auto;
	min-width: 0;
}

.stn-mini.is-invalid .stn-field {
	border-color: var( --stn-danger );
}


/* -------------------------------------------------------------------------------- */
/*	Calculator
/* -------------------------------------------------------------------------------- */


.stn-calc {
	background: var( --stn-card );
	border: 1px solid var( --stn-border );
	border-radius: 20px;
	box-shadow: var( --stn-shadow );
	color: var( --stn-ink );
	font-size: 16px;
	padding: 32px;
	text-align: left;
}

.stn-calc--feature {
	padding: 40px;
}

.stn-calc__title {
	color: var( --stn-ink );
	font-size: clamp( 24px, 3vw, 32px );
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.15;
	margin: 0 0 8px;
}

.stn-calc__text {
	color: var( --stn-muted );
	font-size: 17px;
	line-height: 1.5;
	margin: 0;
}

.stn-calc__form {
	display: grid;
	gap: 14px;
	grid-template-columns: 2fr 1fr 1fr;
	margin: 24px 0 18px;
}

.stn-calc__field label {
	color: var( --stn-muted );
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 6px;
}

.stn-calc__results {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat( 3, 1fr );
	margin: 0 0 18px;
}

.stn-calc__stat {
	background: var( --stn-surface );
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
}

.stn-calc__stat-label {
	color: var( --stn-muted );
	font-size: 13px;
	line-height: 1.3;
}

.stn-calc__stat-value {
	font-size: 22px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.stn-calc__stat--loss .stn-calc__stat-value {
	color: var( --stn-danger );
}

.stn-calc__stat--win {
	background: color-mix( in srgb, var( --stn-accent ) 12%, transparent );
	box-shadow: inset 0 0 0 1.5px color-mix( in srgb, var( --stn-accent ) 40%, transparent );
}

.stn-calc__stat--win .stn-calc__stat-value {
	color: var( --stn-accent );
}

.dark-mode .stn-calc__stat--loss .stn-calc__stat-value { color: #f87171; }
.dark-mode .stn-calc__stat--win .stn-calc__stat-value { color: #34d399; }

.stn-calc:not( .has-result ) .stn-calc__stat-value {
	color: var( --stn-border-strong );
}

.stn-calc.has-result .stn-calc__cta {
	animation: stn-pulse 2.4s ease-out 0.6s 2;
}

@keyframes stn-pulse {
	0%   { box-shadow: 0 0 0 0 color-mix( in srgb, var( --stn-brand ) 45%, transparent ); }
	70%  { box-shadow: 0 0 0 14px transparent; }
	100% { box-shadow: 0 0 0 0 transparent; }
}

.stn-calc__fine {
	color: var( --stn-muted );
	font-size: 13px;
	line-height: 1.4;
	margin: 12px 0 0;
	text-align: center;
}


/* Calculator page ------------------------------- */

.stn-calc-page__header {
	margin-bottom: 40px;
	text-align: center;
}

.stn-calc-page__header .stn-lede {
	margin: 0 auto;
}

.stn-calc-page .entry-content {
	margin-top: 64px;
}


/* -------------------------------------------------------------------------------- */
/*	Single posts
/* -------------------------------------------------------------------------------- */


.entry-content .stn-inline {
	background: color-mix( in srgb, var( --stn-brand ) 7%, var( --stn-card ) );
	border: 1px solid color-mix( in srgb, var( --stn-brand ) 22%, transparent );
	border-left: 4px solid var( --stn-brand );
	border-radius: var( --stn-radius );
	margin: 2.5em 0;
	padding: 28px;
}

.entry-content .stn-inline p {
	margin: 0;
}

.entry-content .stn-inline .stn-eyebrow {
	margin-bottom: 8px;
}

.entry-content .stn-inline .stn-inline__title {
	color: var( --stn-ink );
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.3;
	margin: 0 0 6px;
}

.entry-content .stn-inline .stn-inline__text {
	color: var( --stn-muted );
	font-size: 16px;
	line-height: 1.5;
	margin: 0 0 18px;
}

.entry-content .stn-inline .stn-mini__label {
	font-size: 14px;
}

.stn-author {
	align-items: center;
	border-top: 1px solid var( --stn-border );
	display: flex;
	gap: 16px;
	margin-top: 40px;
	padding-top: 28px;
}

.stn-author__avatar {
	border-radius: 50%;
	flex: 0 0 auto;
}

.stn-author p {
	margin: 0;
}

.stn-author__name {
	font-size: 16px;
	font-weight: 600;
}

.stn-author__about {
	color: var( --stn-muted );
	font-size: 15px;
	line-height: 1.45;
}

.stn-endpost {
	margin-bottom: 96px;
	margin-top: 64px;
}

.stn-comments {
	margin-bottom: 64px;
}


/* Sticky sidebar card (wide screens) ------------- */

.stn-side-card {
	background: var( --stn-card );
	border: 1px solid var( --stn-border );
	border-radius: var( --stn-radius );
	box-shadow: var( --stn-shadow );
	display: none;
	opacity: 0;
	padding: 22px;
	position: fixed;
	right: max( 24px, calc( ( 100vw - 1240px ) / 2 ) );
	top: 50%;
	transform: translate( 12px, -50% );
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
	visibility: hidden;
	width: 250px;
	z-index: 900;
}

.stn-side-card.is-visible {
	opacity: 1;
	transform: translate( 0, -50% );
	transition: opacity 0.25s ease, transform 0.25s ease;
	visibility: visible;
}

.stn-side-card p {
	margin: 0;
}

.stn-side-card__title {
	color: var( --stn-ink );
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.stn-side-card__text {
	color: var( --stn-muted );
	font-size: 15px;
	line-height: 1.45;
	margin: 8px 0 16px !important;
}

.stn-side-card .stn-btn {
	font-size: 15px;
	padding: 12px 14px;
}

@media ( min-width: 1280px ) {
	.stn-side-card { display: block; }
}


/* Sticky bottom bar (mobile) ---------------------- */

.stn-mobile-bar {
	align-items: center;
	background: var( --stn-band );
	bottom: 0;
	box-shadow: 0 -8px 24px -12px rgba( 0, 0, 0, 0.4 );
	color: #fff;
	display: none;
	gap: 12px;
	left: 0;
	padding: 12px 8px 12px 16px;
	padding-bottom: calc( 12px + env( safe-area-inset-bottom ) );
	position: fixed;
	right: 0;
	transform: translateY( 110% );
	transition: transform 0.25s ease;
	z-index: 9000;
}

.stn-mobile-bar.is-visible {
	transform: translateY( 0 );
}

.stn-mobile-bar__text {
	flex: 1 1 auto;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
}

.stn-mobile-bar .stn-btn {
	box-shadow: none;
}

@media ( max-width: 1000px ) {
	.stn-mobile-bar { display: flex; }
}


/* -------------------------------------------------------------------------------- */
/*	Calculator popup
/* -------------------------------------------------------------------------------- */


.stn-modal {
	inset: 0;
	overflow-y: auto;
	padding: 6vh 20px;
	position: fixed;
	z-index: 100001;
}

.stn-modal[hidden] {
	display: none;
}

.stn-modal__backdrop {
	backdrop-filter: blur( 4px );
	-webkit-backdrop-filter: blur( 4px );
	background: rgba( 15, 23, 42, 0.6 );
	inset: 0;
	opacity: 0;
	position: fixed;
	transition: opacity 0.2s ease;
}

.stn-modal__dialog {
	margin: 0 auto;
	max-width: 680px;
	opacity: 0;
	position: relative;
	transform: translateY( 16px ) scale( 0.98 );
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.stn-modal.is-open .stn-modal__backdrop,
.stn-modal.is-open .stn-modal__dialog {
	opacity: 1;
}

.stn-modal.is-open .stn-modal__dialog {
	transform: none;
}

.stn-modal .stn-calc {
	box-shadow: 0 24px 64px -16px rgba( 0, 0, 0, 0.45 );
}

.stn-modal__close,
.dark-mode .stn-modal__close {
	background: transparent;
	border-radius: 8px;
	color: var( --stn-muted );
	cursor: pointer;
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
	padding: 6px 12px;
	position: absolute;
	right: 10px;
	top: 10px;
	z-index: 1;
}

.stn-modal__close:hover {
	background: var( --stn-surface );
	color: var( --stn-ink );
}


/* -------------------------------------------------------------------------------- */
/*	Footer CTA band & footer
/* -------------------------------------------------------------------------------- */


.stn-footer-cta {
	background:
		radial-gradient( 900px 400px at 100% 0%, color-mix( in srgb, var( --stn-brand ) 45%, transparent ), transparent 70% ),
		var( --stn-band );
	color: #fff;
	padding: 96px 0;
}

.stn-footer-cta__inner {
	align-items: center;
	display: grid;
	gap: 56px;
	grid-template-columns: 1.1fr 1fr;
}

.stn-footer-cta .stn-display {
	color: #fff;
}

.stn-footer-cta .stn-lede {
	color: rgba( 255, 255, 255, 0.75 );
}

.stn-footer-cta .stn-mini__label {
	color: #fff;
}

.stn-footer-cta .stn-field {
	--stn-ink: #0f172a;
	--stn-muted: #475569;
	background: #fff;
	border-color: transparent;
}

.stn-footer-cta__direct {
	font-size: 15px;
	margin: 14px 0 0;
}

.stn-footer-cta__direct a {
	color: rgba( 255, 255, 255, 0.8 );
}

.stn-footer-cta__direct a:hover {
	color: #fff;
}

.site-footer {
	padding: 48px 0;
}

.site-footer p {
	font-size: 16px;
	line-height: 1.4;
}

.stn-footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	justify-content: center;
	list-style: none;
	margin: 0 0 24px;
}

.stn-footer-nav li {
	font-size: 16px;
	margin: 0;
}

.stn-footer-nav a {
	text-decoration: none;
}


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


@media ( max-width: 1000px ) {

	.stn-hero__inner,
	.stn-footer-cta__inner {
		gap: 36px;
		grid-template-columns: 1fr;
	}

	.stn-hero {
		padding: 56px 0 64px;
	}

	.stn-footer-cta {
		padding: 64px 0;
	}

}

@media ( max-width: 782px ) {

	.admin-bar .stn-header-bar {
		top: 46px;
	}

}

@media ( max-width: 620px ) {

	:root {
		--stn-header-h: 64px;
	}

	.admin-bar .stn-header-bar {
		top: 0;
	}

	.stn-header-bar .site-header,
	.wp-custom-logo .stn-header-bar .site-header {
		gap: 14px;
		padding: 10px 0;
	}

	.stn-header-bar .site-header .custom-logo img {
		height: 32px;
	}

	.stn-header-cta {
		font-size: 14px;
		padding: 9px 14px;
	}

	.stn-header-cta__full {
		display: none;
	}

	.stn-header-cta__short {
		display: inline;
	}

	#site-content {
		padding-top: 40px;
	}

	.stn-has-hero #site-content {
		padding-top: 0;
	}

	.stn-lede {
		font-size: 18px;
	}

	.stn-hero__form .stn-mini,
	.stn-calc,
	.stn-calc--feature,
	.entry-content .stn-inline {
		padding: 22px;
	}

	.stn-mini__row {
		flex-direction: column;
	}

	.stn-calc__form {
		grid-template-columns: 1fr 1fr;
	}

	.stn-calc__field--mrr {
		grid-column: 1 / -1;
	}

	.stn-calc__results {
		grid-template-columns: 1fr;
	}

	.stn-calc__stat {
		align-items: baseline;
		flex-direction: row;
		justify-content: space-between;
	}

	.stn-calc__stat-value {
		font-size: 20px;
	}

	.stn-modal {
		padding: 12px;
	}

	.stn-endpost {
		margin-bottom: 64px;
		margin-top: 48px;
	}

}

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

	.stn-btn,
	.stn-side-card,
	.stn-mobile-bar,
	.stn-modal__dialog,
	.stn-modal__backdrop {
		transition: none;
	}

	.stn-calc.has-result .stn-calc__cta {
		animation: none;
	}

}
