/* ==========================================================================
   Newsletter opt-in — v11 "Pastel"
   --------------------------------------------------------------------------
   Behaviour is unchanged (fields, honeypot, time trap, consent, double
   opt-in). The email field and the Subscribe button are one white pill: an
   envelope glyph, the input, and a raspberry button tucked inside the right
   edge. Consent sits beneath it with a drawn, rounded checkbox.
   ========================================================================== */

.st-optin {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	width: 100%;
}

.st-optin__field {
	display: block;
	width: 100%;
}

/* ── The joined row ───────────────────────────────────────────────────── */
.st-optin__row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 6px 6px 18px;
	border: 2px solid var(--ink);
	border-radius: 16px;
	background: var(--surface);
	box-shadow: 4px 4px 0 var(--ink);
	transition: box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.st-optin__row:focus-within {
	box-shadow: 2px 2px 0 var(--accent);
	border-color: var(--accent);
	transform: translate(2px, 2px);
}

.st-optin__row.has-error {
	border-color: var(--accent-deep);
}

.st-optin__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 22px;
	height: 22px;
	color: var(--accent);
}

.st-optin__icon svg {
	width: 100%;
	height: 100%;
}

.st-optin__input {
	flex: 1;
	min-width: 0;
	padding: 0.7rem 0.2rem;
	border: 0;
	background: transparent;
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--fs-small);
	font-weight: 500;
	line-height: 1.4;
}

.st-optin__input::placeholder {
	color: var(--ink-3);
}

.st-optin__input:focus {
	outline: none;
}

.st-optin__submit {
	flex: none;
	padding: 0.8rem 1.35rem;
	border: 0;
	border-radius: 11px;
	background: var(--accent);
	color: #fff;
	font-family: var(--font-body);
	font-size: var(--fs-small);
	font-weight: 700;
	cursor: pointer;
	transition: background var(--speed) var(--ease);
}

.st-optin__submit:hover,
.st-optin__submit:focus-visible {
	background: var(--accent-deep);
}

.st-optin__submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* ── Consent ──────────────────────────────────────────────────────────── */
.st-optin__consent-label {
	position: relative;
	display: flex;
	align-items: flex-start;
	cursor: pointer;
}

.st-optin__checkbox {
	position: absolute;
	top: 0;
	left: 0;
	width: 1.2rem;
	height: 1.2rem;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.st-optin__consent-text {
	position: relative;
	padding-left: 1.9rem;
	color: var(--ink-2);
	font-size: var(--fs-micro);
	line-height: 1.55;
}

.st-optin__consent-text::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 1.2rem;
	height: 1.2rem;
	border: 2px solid var(--ink);
	border-radius: 6px;
	background: var(--surface);
	transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.st-optin__consent-text::after {
	content: "";
	position: absolute;
	left: 0.42rem;
	top: 0.2rem;
	width: 0.32rem;
	height: 0.6rem;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform 160ms var(--ease);
}

.st-optin__checkbox:checked + .st-optin__consent-text::before {
	border-color: var(--accent);
	background: var(--accent);
}

.st-optin__checkbox:checked + .st-optin__consent-text::after {
	transform: rotate(45deg) scale(1);
}

.st-optin__checkbox:focus-visible + .st-optin__consent-text::before {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

.st-optin__consent.has-error .st-optin__consent-text::before {
	border-color: var(--accent-deep);
}

.st-optin__consent-text a {
	color: var(--ink);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.15em;
}

.st-optin__field-error {
	display: block;
	margin-top: 0.35rem;
	color: var(--accent-deep);
	font-size: var(--fs-micro);
	font-weight: 600;
}

.st-optin__consent .st-optin__field-error {
	padding-left: 1.9rem;
}

/* ── Status line ──────────────────────────────────────────────────────── */
.st-optin__message {
	margin: 0;
	padding: 0.7rem 1rem;
	border-radius: 12px;
	background: var(--surface);
	color: var(--ink-2);
	font-size: var(--fs-meta);
	font-weight: 600;
	line-height: 1.5;
}

.st-optin__message:empty {
	display: none;
}

.st-optin__message.is-success {
	background: #E1F1E3;
	color: #2F6640;
}

.st-optin__message.is-error {
	background: var(--accent-tint);
	color: var(--accent-deep);
}

.st-optin.is-done .st-optin__row,
.st-optin.is-done .st-optin__consent {
	display: none;
}

.st-optin__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 420px) {
	.st-optin__row {
		flex-wrap: wrap;
		padding: 8px 8px 8px 16px;
	}

	.st-optin__input {
		flex-basis: calc(100% - 40px);
	}

	.st-optin__submit {
		width: 100%;
	}
}

/* ── The modal ────────────────────────────────────────────────────────── */
.st-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: grid;
	place-items: center;
	padding: var(--gutter);
}

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

.st-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 34, 80, 0.5);
	backdrop-filter: blur(4px);
}

.st-modal__dialog {
	position: relative;
	width: min(32rem, 100%);
	max-height: 90vh;
	overflow-y: auto;
	padding: clamp(1.75rem, 4vw, 2.5rem);
	border-radius: var(--r-lg);
	background: linear-gradient(var(--rose) 0 7.5rem, var(--surface) 7.5rem);
	box-shadow: 0 40px 80px -40px rgba(26, 34, 80, 0.6);
	animation: st-modal-rise 240ms var(--ease) both;
}

@keyframes st-modal-rise {
	from { opacity: 0; transform: translateY(14px) scale(0.98); }
	to   { opacity: 1; transform: none; }
}

.st-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--surface);
	color: var(--ink);
	font-size: 1.4rem;
	line-height: 1;
	transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.st-modal__close:hover,
.st-modal__close:focus-visible {
	background: var(--ink);
	color: #fff;
}

.st-modal__art {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	margin: 1.4rem 0 1.4rem;
	border-radius: 22px;
	background: var(--surface);
	color: var(--accent);
	box-shadow: 0 14px 30px -18px rgba(26, 34, 80, 0.45);
	transform: rotate(-6deg);
}

.st-modal__art svg {
	width: 34px;
	height: 34px;
}

.st-modal__title {
	margin: 0;
	color: var(--ink);
	font-family: var(--font-display);
	font-size: clamp(1.7rem, 3.5vw, 2.1rem);
	font-weight: 700;
	font-variation-settings: "SOFT" 100;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.st-modal__sub {
	margin: 0.7rem 0 1.6rem;
	color: var(--ink-2);
	font-size: var(--fs-small);
	line-height: 1.55;
}
