/**
 * Sprasa Maintenance - shared frontend styles.
 * All design tokens are injected as CSS variables by the renderer.
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body.sprasa-maint {
	margin: 0;
	min-height: 100vh;
	font-family: var(--sm-body-font);
	font-size: var(--sm-body-size);
	line-height: 1.65;
	color: var(--sm-text);
	background: var(--sm-bg);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.sprasa-maint::before {
	content: "";
	position: fixed;
	inset: 0;
	backdrop-filter: blur(var(--sm-blur));
	-webkit-backdrop-filter: blur(var(--sm-blur));
	pointer-events: none;
}

.sm-overlay {
	position: fixed;
	inset: 0;
	background: var(--sm-overlay);
	pointer-events: none;
}

.sm-shell {
	position: relative;
	z-index: 2;
}

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

a {
	color: var(--sm-accent);
}

.sm-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Header elements */
.sm-logo img {
	width: var(--sm-logo-width);
	max-width: 100%;
}

.sm-align-center .sm-logo img {
	margin-left: auto;
	margin-right: auto;
}

.sm-sitename {
	font-family: var(--sm-heading-font);
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -.01em;
}

.sm-eyebrow {
	margin: 0 0 12px;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--sm-accent);
}

.sm-headline {
	margin: 0 0 16px;
	font-family: var(--sm-heading-font);
	font-size: clamp(28px, 6vw, var(--sm-heading-size));
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.02em;
	color: var(--sm-text);
}

.sm-message {
	color: var(--sm-muted);
}

.sm-message p {
	margin: 0 0 12px;
}

.sm-message p:last-child {
	margin-bottom: 0;
}

/* Countdown */
.sm-countdown {
	display: flex;
	align-items: flex-end;
	justify-content: var(--sm-flex-align);
	flex-wrap: wrap;
	gap: 10px;
	margin: 30px 0 0;
}

.sm-cd-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 68px;
}

.sm-cd-value {
	font-family: var(--sm-heading-font);
	font-size: clamp(26px, 5vw, 44px);
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.sm-cd-label {
	margin-top: 6px;
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--sm-muted);
}

.sm-cd-sep {
	font-size: clamp(20px, 4vw, 34px);
	line-height: 1;
	padding-bottom: 20px;
	color: var(--sm-muted);
	opacity: .5;
}

.sm-countdown-done {
	margin: 24px 0 0;
	font-weight: 600;
	color: var(--sm-accent);
}

/* Progress */
.sm-progress {
	margin: 30px 0 0;
	text-align: left;
}

.sm-progress-top {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
	font-size: .85rem;
	color: var(--sm-muted);
}

.sm-progress-num {
	color: var(--sm-accent);
	font-weight: 700;
}

.sm-progress-track {
	height: 8px;
	border-radius: 999px;
	background: var(--sm-accent-soft);
	overflow: hidden;
}

.sm-progress-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--sm-accent);
	transition: width .8s cubic-bezier(.16, .84, .44, 1);
}

/* Subscribe */
.sm-subscribe {
	margin: 32px 0 0;
}

.sm-subscribe-title {
	margin: 0 0 14px;
	font-family: var(--sm-heading-font);
	font-size: 1.05rem;
	font-weight: 700;
}

.sm-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: var(--sm-flex-align);
}

.sm-fields input[type="email"],
.sm-fields input[type="text"] {
	flex: 1 1 200px;
	min-width: 0;
	padding: 13px 16px;
	font: inherit;
	font-size: .95rem;
	color: var(--sm-text);
	background: var(--sm-accent-soft);
	border: 1px solid var(--sm-border);
	border-radius: calc(var(--sm-radius) / 1.6);
	outline: none;
	transition: border-color .18s ease, box-shadow .18s ease;
}

.sm-fields input::placeholder {
	color: var(--sm-muted);
	opacity: .75;
}

.sm-fields input:focus-visible {
	border-color: var(--sm-accent);
	box-shadow: 0 0 0 3px var(--sm-accent-soft);
}

.sm-btn {
	padding: 13px 26px;
	font: inherit;
	font-weight: 700;
	color: var(--sm-on-accent);
	background: var(--sm-accent);
	border: 0;
	border-radius: calc(var(--sm-radius) / 1.6);
	cursor: pointer;
	transition: transform .15s ease, filter .15s ease;
}

.sm-btn:hover {
	filter: brightness(1.08);
}

.sm-btn:active {
	transform: translateY(1px);
}

.sm-btn[disabled] {
	opacity: .6;
	cursor: progress;
}

.sm-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sm-subscribe-note {
	margin: 12px 0 0;
	min-height: 1.2em;
	font-size: .88rem;
	color: var(--sm-muted);
}

.sm-subscribe-note.is-error {
	color: #ff6b6b;
}

.sm-subscribe-note.is-success {
	color: var(--sm-accent);
}

.sm-consent {
	margin: 10px 0 0;
	font-size: .78rem;
	color: var(--sm-muted);
	opacity: .85;
}

/* Contact and social */
.sm-contact {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	justify-content: var(--sm-flex-align);
	margin: 28px 0 0;
	font-size: .9rem;
	color: var(--sm-muted);
}

.sm-contact-item {
	color: var(--sm-muted);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.sm-contact-item:hover {
	color: var(--sm-accent);
	border-bottom-color: var(--sm-accent-line);
}

.sm-social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: var(--sm-flex-align);
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
}

.sm-social a {
	display: inline-block;
	padding: 8px 16px;
	font-size: .82rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--sm-text);
	background: var(--sm-accent-soft);
	border: 1px solid var(--sm-border);
	border-radius: 999px;
	transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.sm-social a:hover {
	color: var(--sm-accent);
	border-color: var(--sm-accent-line);
	transform: translateY(-2px);
}

/* Footer */
.sm-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	align-items: center;
	justify-content: var(--sm-flex-align);
	font-size: .8rem;
	color: var(--sm-muted);
	opacity: .8;
}

.sm-login-link {
	color: var(--sm-muted);
	text-decoration: none;
	border-bottom: 1px dotted var(--sm-border);
}

.sm-login-link:hover {
	color: var(--sm-accent);
}

/* Preview flag */
.sm-preview-flag {
	position: fixed;
	z-index: 99;
	top: 0;
	left: 0;
	right: 0;
	padding: 7px 14px;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	color: #0b1120;
	background: #ffd166;
}

/* Motion */
.sm-fade {
	animation: sm-rise .7s cubic-bezier(.16, .84, .44, 1) both;
}

@keyframes sm-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

body.sm-no-anim .sm-fade {
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	.sm-fade,
	.sm-progress-fill {
		animation: none;
		transition: none;
	}
}

@media (max-width: 600px) {
	.sm-fields {
		flex-direction: column;
	}

	.sm-btn {
		width: 100%;
	}
}
