/**
 * Opt-in form + subscribe modal.
 *
 * Consumes the theme's design tokens from main.css so the form inherits the
 * palette automatically; the fallbacks after each var() keep it presentable if
 * loaded standalone.
 */

.st-optin {
	display: block;
	width: 100%;
	text-align: left;
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.st-optin__hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.st-optin__field {
	display: block;
	margin-bottom: 0.85rem;
}

.st-optin__input {
	font-family: var(--font-body, sans-serif);
	font-size: 0.95rem;
	line-height: 1.4;
	color: var(--ink-100, #0A0722);
	background: #fff;
	border: 1px solid var(--line-firm, rgba(10, 7, 34, 0.26));
	border-radius: var(--radius, 4px);
	width: 100%;
	padding: 0.7rem 0.85rem;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.st-optin__input::placeholder {
	color: var(--ink-500, #6A6490);
}

.st-optin__input:focus {
	outline: none;
	border-color: var(--brand, #2B7FFF);
	box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.16);
}

/* Consent row */
.st-optin__consent {
	margin-bottom: 1rem;
}

.st-optin__consent-label {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	cursor: pointer;
	margin: 0;
}

.st-optin__checkbox {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	margin: 0.15rem 0 0 0;
	accent-color: var(--brand, #2B7FFF);
	cursor: pointer;
}

.st-optin__consent-text {
	font-family: var(--font-body, sans-serif);
	font-size: 0.76rem;
	line-height: 1.5;
	color: var(--ink-400, #5A5480);
}

.st-optin__consent-text a {
	color: var(--brand, #2B7FFF);
	text-decoration: underline;
}

.st-optin__consent-text a:hover {
	text-decoration: none;
}

/* Submit */
.st-optin__submit {
	font-family: var(--font-body, sans-serif);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	color: #fff;
	background: var(--brand, #2B7FFF);
	padding: 0.8rem 1.2rem;
	border: 0;
	border-radius: var(--radius-pill, 999px);
	cursor: pointer;
	transition: background 0.18s ease, transform 0.18s ease;
}

.st-optin__submit:hover {
	background: var(--brand-dark, #1C63D6);
}

.st-optin__submit:active {
	transform: translateY(1px);
}

.st-optin__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Messages */
.st-optin__message {
	font-family: var(--font-body, sans-serif);
	font-size: 0.8rem;
	line-height: 1.5;
	margin: 0.75rem 0 0 0;
}

.st-optin__message:empty {
	display: none;
}

.st-optin__message.is-error {
	color: var(--red, #C2261A);
}

.st-optin__message.is-success {
	color: var(--green, #1F7346);
	font-weight: 600;
}

.st-optin__field-error {
	display: block;
	font-family: var(--font-body, sans-serif);
	font-size: 0.72rem;
	line-height: 1.4;
	color: var(--red, #C2261A);
	margin-top: 0.3rem;
}

.st-optin__field.has-error .st-optin__input {
	border-color: var(--red, #C2261A);
}

.st-optin__field.has-error .st-optin__checkbox {
	outline: 2px solid var(--red, #C2261A);
	outline-offset: 1px;
}

/* Once submitted, leave only the confirmation message. */
.st-optin.is-done .st-optin__field,
.st-optin.is-done .st-optin__submit {
	display: none;
}

/* Company footer block */
.st-optin__footer {
	margin-top: 1.1rem;
	padding-top: 0.8rem;
	border-top: 1px solid var(--line-soft, rgba(10, 7, 34, 0.13));
	font-family: var(--font-body, sans-serif);
	font-size: 0.68rem;
	line-height: 1.65;
	color: var(--ink-500, #6A6490);
}

/* Each part goes on its own line, but the link is inline-block so its hover
   target and underline cover the address text only, not the whole row. */
.st-optin__footer span {
	display: block;
}

.st-optin__footer a {
	display: inline-block;
}

.st-optin__company {
	font-weight: 600;
	color: var(--ink-300, #3D3866);
}

.st-optin__support {
	color: var(--brand, #2B7FFF);
	text-decoration: none;
}

.st-optin__support:hover {
	text-decoration: underline;
}

.st-optin .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Subscribe modal ─────────────────────────────────────────────────────── */

.st-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.st-modal[hidden] {
	display: none;
}

.st-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 7, 34, 0.55);
	backdrop-filter: blur(2px);
}

.st-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: var(--radius-lg, 10px);
	padding: 2rem 1.75rem 1.75rem;
	box-shadow: 0 24px 60px rgba(10, 7, 34, 0.28);
	max-height: 92vh;
	overflow-y: auto;
	animation: st-modal-in 0.22s var(--ease, ease) both;
}

@keyframes st-modal-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.st-modal__dialog { animation: none; }
}

.st-modal__close {
	position: absolute;
	top: 0.6rem;
	right: 0.75rem;
	width: 32px;
	height: 32px;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--ink-400, #5A5480);
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.st-modal__close:hover {
	background: var(--navy-850, #F4F5FB);
	color: var(--ink-100, #0A0722);
}

.st-modal__kicker {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--brand, #2B7FFF);
	margin: 0 0 0.4rem;
}

.st-modal__title {
	font-family: var(--font-display, sans-serif);
	font-size: 1.4rem;
	line-height: 1.2;
	color: var(--ink-100, #0A0722);
	margin: 0 0 0.5rem;
}

.st-modal__sub {
	font-size: 0.85rem;
	line-height: 1.55;
	color: var(--ink-400, #5A5480);
	margin: 0 0 1.25rem;
}

body.st-modal-open {
	overflow: hidden;
}
