/*
 * Página de boas-vindas do SGO TRINP (Prefeitura de Belém).
 * Cópia em CSS puro da tela `/boas-vindas/pa` do trinp-front: cada valor repete a classe Tailwind
 * usada lá (comentada ao lado quando ajuda a conferir). Breakpoints do Tailwind: sm 40rem,
 * md 48rem, lg 64rem.
 */

:root {
	/* Paleta do SGO (src/styles/index.css do trinp-front). */
	--blue-main: #33469b;
	--blue-light: #4a52e3;
	--blue-dark: #263868;
	--brand-green: #55ba5e;
	--blue-900: oklch(35.2% 0.087 266.5);
	--orange-400: oklch(75% 0.183 55.934);
	--orange-600: oklch(64.6% 0.222 41.116);
	--orange-700: oklch(55.3% 0.195 38.402);
	--orange-900: oklch(40.8% 0.123 38.172);
	--sgo-navy: #0b1f5b;
	--sgo-blue: #1d4ed8;
	--sgo-blue-soft: #e8effc;
	--sgo-canvas: #f3f7fd;
	--sgo-line: #e1e9f5;
	--sgo-ink: #475569;
	--slate-500: oklch(55.4% 0.046 257.417);
	--foreground: oklch(0.145 0 0);
	--accent: oklch(0.97 0 0);
	--muted-foreground: oklch(0.556 0 0);
	--ring: #4a52e3;

	--font-sans:
		ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
		"Noto Color Emoji";
	--font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
	--ease: cubic-bezier(0.4, 0, 0.2, 1);
	--transition-props:
		color, background-color, border-color, outline-color, text-decoration-color, fill, stroke,
		opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter,
		backdrop-filter;
}

/* ---- Base (o essencial do preflight do Tailwind) ---- */

*,
::before,
::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 0 solid oklch(0.922 0 0);
}

html {
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	tab-size: 4;
	font-family: var(--font-sans);
}

body {
	background-color: #fff;
	color: var(--foreground);
}

h1,
h2 {
	font-size: inherit;
	font-weight: inherit;
}

a {
	color: inherit;
	text-decoration: inherit;
}

ul {
	list-style: none;
}

img,
svg {
	display: block;
	vertical-align: middle;
}

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

button {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
	background-color: transparent;
	border-radius: 0;
}

/* Ícones (mesmo traçado dos ícones Lucide do SGO). */
svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

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

/* ---- Página ---- */

/* `overflow: clip`, não `hidden`: os arcos passam da borda e, com `hidden`, o foco (ao fechar o
   modal) rolava a página para o lado. */
.welcome {
	position: relative;
	min-height: 100vh;
	overflow: clip;
	background: #fff url("../assets/login-bg.webp") center / cover no-repeat;
}

/* Véu branco: clareia o centro, onde ficam as marcas e o texto, e deixa a foto nas bordas. */
.welcome__veil {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to bottom, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 30%),
		radial-gradient(
			ellipse at center,
			rgba(255, 255, 255, 0.88) 0%,
			rgba(255, 255, 255, 0.55) 45%,
			rgba(255, 255, 255, 0.05) 100%
		);
}

/* Arcos verdes das bordas, como na identidade do SGO. */
.welcome__arc {
	pointer-events: none;
	position: absolute;
	border-radius: 9999px;
	border: 10px solid color-mix(in oklab, var(--brand-green) 60%, transparent);
}

.welcome__arc--top {
	top: -35vh;
	left: -30vw;
	width: 90vh;
	height: 90vh;
	border-right-color: transparent;
	border-bottom-color: transparent;
}

.welcome__arc--bottom {
	right: -30vw;
	bottom: -40vh;
	width: 80vh;
	height: 80vh;
	border-top-color: transparent;
	border-left-color: transparent;
}

.welcome__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	padding: 1.25rem 1rem; /* px-4 py-5 */
}

.welcome__header {
	display: flex;
	justify-content: center;
}

.welcome__city-logo {
	width: auto;
	height: 3rem; /* h-12 */
}

.welcome__main {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding-block: 2.5rem; /* py-10 */
	text-align: center;
}

/* Faixa verde → azul na base, como nas telas públicas do SGO. */
.welcome__stripe {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 0.25rem;
	background-image: linear-gradient(
		to right in oklab,
		var(--brand-green),
		var(--blue-light),
		var(--blue-dark)
	);
}

/* Marcas: SGO maior que a Trinp. */
.brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem; /* gap-4 */
}

.brand__sgo {
	width: auto;
	height: 2.5rem; /* h-10 */
}

.brand__divider {
	width: 0.125rem;
	height: 2rem; /* h-8 */
	background-color: color-mix(in oklab, var(--blue-dark) 70%, transparent);
}

.brand__trinp {
	width: auto;
	height: 1.75rem; /* h-7 */
}

.tagline {
	display: flex;
	width: 100%;
	max-width: 48rem; /* max-w-3xl */
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.5rem; /* mt-6 */
}

.tagline__line {
	flex: 1;
	height: 0.125rem;
	background-color: var(--brand-green);
}

.tagline__text {
	font-weight: 600;
	color: var(--blue-dark);
	font-size: 0.75rem;
	line-height: calc(1 / 0.75);
	letter-spacing: 0.3em;
}

.lead {
	max-width: 42rem; /* max-w-2xl */
	margin-top: 1.25rem; /* mt-5 */
	text-wrap: balance;
	font-weight: 500;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--blue-dark);
}

/* Áreas do sistema: cada uma abre o modal. */
.solutions {
	display: grid;
	width: 100%;
	max-width: 64rem; /* max-w-5xl */
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin-top: 2rem; /* mt-8 */
}

.solutions > li {
	display: flex;
}

.solution {
	display: flex;
	width: 100%;
	cursor: pointer;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	padding: 1rem 0.75rem 0.75rem; /* px-3 pt-4 pb-3 */
	border: 1px solid color-mix(in oklab, #fff 70%, transparent);
	border-radius: 1rem;
	background-color: color-mix(in oklab, #fff 75%, transparent);
	--shadow: color-mix(in oklab, var(--blue-900) 10%, transparent);
	box-shadow:
		0 10px 15px -3px var(--shadow),
		0 4px 6px -4px var(--shadow); /* shadow-lg */
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition-property: var(--transition-props);
	transition-timing-function: var(--ease);
	transition-duration: 150ms;
}

.solution:hover {
	translate: 0 -0.25rem;
	border-color: color-mix(in oklab, var(--blue-light) 40%, transparent);
	background-color: #fff;
	--shadow: color-mix(in oklab, var(--blue-900) 20%, transparent);
	box-shadow:
		0 20px 25px -5px var(--shadow),
		0 8px 10px -6px var(--shadow); /* shadow-xl */
}

.solution:focus-visible {
	outline: none;
	box-shadow:
		0 0 0 4px color-mix(in oklab, var(--blue-light) 40%, transparent),
		0 10px 15px -3px var(--shadow),
		0 4px 6px -4px var(--shadow);
}

.solution:hover:focus-visible {
	box-shadow:
		0 0 0 4px color-mix(in oklab, var(--blue-light) 40%, transparent),
		0 20px 25px -5px var(--shadow),
		0 8px 10px -6px var(--shadow);
}

.solution__icon {
	width: 2.25rem;
	height: 2.25rem;
	color: var(--blue-main);
	stroke-width: 1.5;
	transition-property: var(--transition-props);
	transition-timing-function: var(--ease);
	transition-duration: 150ms;
}

.solution:hover .solution__icon {
	color: var(--blue-light);
}

.solution__label {
	font-weight: 500;
	color: var(--blue-dark);
	font-size: 0.875rem;
	line-height: 1.25; /* leading-tight */
}

.solution__more {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-weight: 500;
	color: var(--blue-light);
	font-size: 0.75rem;
	line-height: calc(1 / 0.75);
	opacity: 0.8;
	transition-property: var(--transition-props);
	transition-timing-function: var(--ease);
	transition-duration: 150ms;
}

.solution:hover .solution__more {
	opacity: 1;
}

.solution__arrow {
	width: 0.75rem;
	height: 0.75rem;
	transition-property: var(--transition-props);
	transition-timing-function: var(--ease);
	transition-duration: 150ms;
}

.solution:hover .solution__arrow {
	translate: 0.125rem 0;
}

/* Botão de acesso (laranja). */
.cta {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 2.5rem; /* mt-10 */
	padding: 1rem 2rem; /* px-8 py-4 */
	border-radius: 9999px;
	background-color: var(--orange-600);
	font-weight: 600;
	font-size: 1.125rem;
	line-height: calc(1.75 / 1.125);
	color: #fff;
	--shadow: color-mix(in oklab, var(--orange-900) 30%, transparent);
	box-shadow:
		0 20px 25px -5px var(--shadow),
		0 8px 10px -6px var(--shadow); /* shadow-xl */
	transition-property: var(--transition-props);
	transition-timing-function: var(--ease);
	transition-duration: 150ms;
}

.cta:hover {
	translate: 0 -0.125rem;
	background-color: var(--orange-700);
}

.cta:focus-visible {
	outline: none;
	box-shadow:
		0 0 0 4px color-mix(in oklab, var(--orange-400) 50%, transparent),
		0 20px 25px -5px var(--shadow),
		0 8px 10px -6px var(--shadow);
}

.cta__icon {
	width: 1.5rem;
	height: 1.5rem;
}

/* ---- Modal (DialogLayout do SGO) ---- */

html.has-modal {
	overflow: hidden;
}

.modal {
	position: fixed;
	inset: auto;
	top: 50%;
	left: 50%;
	z-index: 50;
	translate: -50% -50%;
	margin: 0;
	width: 100%;
	max-width: calc(100% - 2rem);
	max-height: 90vh;
	flex-direction: column;
	gap: 0;
	overflow: clip;
	padding: 0;
	border: 1px solid var(--sgo-line);
	border-radius: 1rem;
	background-color: #fff;
	color: var(--foreground);
	font-family: var(--font-display);
	box-shadow:
		0 10px 15px -3px rgb(0 0 0 / 0.1),
		0 4px 6px -4px rgb(0 0 0 / 0.1); /* shadow-lg */
}

.modal[open] {
	display: flex;
	animation: modal-enter 200ms ease;
}

.modal::backdrop {
	background-color: rgb(0 0 0 / 0.5);
	animation: backdrop-enter 150ms ease;
}

.modal.is-closing {
	animation: modal-exit 200ms ease forwards;
}

.modal.is-closing::backdrop {
	animation: backdrop-exit 150ms ease forwards;
}

@keyframes modal-enter {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
}

@keyframes modal-exit {
	to {
		opacity: 0;
		transform: scale(0.95);
	}
}

@keyframes backdrop-enter {
	from {
		opacity: 0;
	}
}

@keyframes backdrop-exit {
	to {
		opacity: 0;
	}
}

.modal__header {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem 3rem 1.25rem 1.5rem; /* px-6 py-5 pr-12 */
	border-bottom: 1px solid var(--sgo-line);
	text-align: left;
}

.modal__bubble {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 9999px;
	background-color: var(--sgo-blue-soft);
	color: var(--sgo-blue);
}

.modal__bubble svg {
	width: 1.5rem;
	height: 1.5rem;
}

.modal__heading {
	min-width: 0;
}

.modal__title {
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.375; /* leading-snug */
	color: var(--sgo-navy);
}

.modal__summary {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	font-size: 0.875rem;
	line-height: calc(1.25 / 0.875);
	color: var(--slate-500);
}

.modal__body {
	min-height: 0;
	flex: 1;
	overflow-y: auto;
	padding: 1.25rem 1.5rem; /* px-6 py-5 */
	font-size: 0.875rem;
	line-height: calc(1.25 / 0.875);
	color: var(--sgo-ink);
}

.modal__eyebrow {
	margin-bottom: 0.75rem;
	font-weight: 600;
	color: var(--sgo-navy);
	font-size: 0.75rem;
	line-height: calc(1 / 0.75);
	text-transform: uppercase;
	letter-spacing: 0.025em;
}

.modal__features > li {
	display: flex;
	gap: 0.75rem;
	line-height: 1.625; /* leading-relaxed */
}

.modal__features > li + li {
	margin-top: 0.75rem; /* space-y-3 */
}

.modal__features svg {
	width: 1rem;
	height: 1rem;
	margin-top: 0.125rem;
	color: var(--brand-green);
}

.modal__footer {
	display: flex;
	flex-direction: column-reverse;
	gap: 0.5rem;
	padding: 1rem 1.5rem; /* px-6 py-4 */
	border-top: 1px solid var(--sgo-line);
	background-color: color-mix(in oklab, var(--sgo-canvas) 60%, transparent);
}

.modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	cursor: pointer;
	border-radius: 0.125rem;
	background-color: var(--accent);
	color: var(--muted-foreground);
	opacity: 0.7;
	transition-property: opacity;
	transition-timing-function: var(--ease);
	transition-duration: 150ms;
}

.modal__close:hover {
	opacity: 1;
}

.modal__close:focus {
	outline: 2px solid transparent;
	box-shadow:
		0 0 0 2px #fff,
		0 0 0 4px var(--ring);
}

.modal__close svg {
	width: 1rem;
	height: 1rem;
	pointer-events: none;
}

/* Botões do rodapé (variantes `soft` e `brand` do SGO, tamanho `lg`). */
.button {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 2.5rem;
	padding-inline: 1.5rem; /* px-6 */
	border-radius: 8px;
	white-space: nowrap;
	font-size: 0.875rem;
	line-height: calc(1.25 / 0.875);
	font-weight: 500;
	outline: none;
	transition: all 150ms var(--ease);
}

.button:has(> svg) {
	padding-inline: 1rem; /* has-[>svg]:px-4 */
}

.button__icon {
	width: 1rem;
	height: 1rem;
	pointer-events: none;
}

.button--soft {
	border: 1px solid var(--sgo-line);
	background-color: #fff;
	color: var(--sgo-navy);
	box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); /* shadow-xs */
}

.button--soft:hover {
	border-color: color-mix(in oklab, var(--sgo-blue) 30%, transparent);
	background-color: var(--sgo-blue-soft);
	color: var(--sgo-blue);
}

.button--soft:focus-visible {
	border-color: var(--ring);
	box-shadow:
		0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent),
		0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.button--orange {
	background-color: var(--orange-600);
	color: #fff;
	--shadow: color-mix(in oklab, var(--orange-900) 20%, transparent);
	box-shadow:
		0 1px 3px 0 var(--shadow),
		0 1px 2px -1px var(--shadow); /* shadow-sm */
}

.button--orange:hover {
	background-color: var(--orange-700);
}

.button--orange:focus-visible {
	box-shadow:
		0 0 0 3px color-mix(in oklab, var(--orange-400) 50%, transparent),
		0 1px 3px 0 var(--shadow),
		0 1px 2px -1px var(--shadow);
}

/* ---- sm (≥ 40rem) ---- */
@media (min-width: 40rem) {
	.brand {
		gap: 1.75rem; /* sm:gap-7 */
	}

	.brand__sgo {
		height: 3.5rem; /* sm:h-14 */
	}

	.brand__divider {
		height: 2.75rem; /* sm:h-11 */
	}

	.brand__trinp {
		height: 2.5rem; /* sm:h-10 */
	}

	.tagline {
		gap: 1.25rem; /* sm:gap-5 */
	}

	.tagline__text {
		font-size: 1rem;
		line-height: 1.5;
	}

	.lead {
		font-size: 1.125rem;
		line-height: calc(1.75 / 1.125);
	}

	.solutions {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.modal {
		max-width: 36rem; /* sm:max-w-xl */
	}

	.modal__footer {
		flex-direction: row;
		justify-content: flex-end;
	}
}

/* ---- md (≥ 48rem) ---- */
@media (min-width: 48rem) {
	.welcome__arc--top {
		left: -12vw;
	}

	.welcome__arc--bottom {
		right: -10vw;
	}

	.welcome__inner {
		padding: 2rem 3rem; /* md:px-12 md:py-8 */
	}

	.welcome__header {
		justify-content: flex-start;
	}

	.welcome__city-logo {
		height: 4rem; /* md:h-16 */
	}

	.brand__sgo {
		height: 5rem; /* md:h-20 */
	}

	.brand__divider {
		height: 4rem; /* md:h-16 */
	}

	.brand__trinp {
		height: 3.25rem; /* md:h-13 */
	}

	.tagline {
		margin-top: 2rem; /* md:mt-8 */
	}

	.tagline__text {
		font-size: 1.25rem;
		line-height: calc(1.75 / 1.25);
		letter-spacing: 0.4em;
	}

	.lead {
		font-size: 1.25rem;
		line-height: calc(1.75 / 1.25);
	}

	.solutions {
		margin-top: 2.5rem; /* md:mt-10 */
	}

	.cta {
		margin-top: 3rem; /* md:mt-12 */
		padding-inline: 3rem; /* md:px-12 */
		font-size: 1.25rem;
		line-height: calc(1.75 / 1.25);
	}
}

/* ---- lg (≥ 64rem) ---- */
@media (min-width: 64rem) {
	.solutions {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}
