@import url("https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,300..700&display=swap");

:root {
	--primary: #4f46e5;
	--on-primary: #ffffff;
	--primary-container: #e0e7ff;
	--on-primary-container: #1e1b4b;
	--secondary: #0ea5e9;
	--surface: #ffffff;
	--surface-2: #f8fafc;
	--surface-3: #eef2ff;
	--on-surface: #111827;
	--muted: #6b7280;
	--outline: #d1d5db;
	--shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
	--shadow-soft: 0 6px 16px rgba(15, 23, 42, 0.08);
	--radius: 16px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Roboto Flex", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
	background: radial-gradient(circle at top, #eef2ff 0%, #f8fafc 45%, #eef2ff 100%);
	color: var(--on-surface);
	min-height: 100vh;
}

.top-app-bar {
	background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 45%, #f8fafc 100%);
	border-bottom: 1px solid rgba(148, 163, 184, 0.3);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}


.app-bar-content {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.5rem 1.5rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.app-bar-main {
	display: grid;
	gap: 0.35rem;
	text-align: left;
}

.app-name {
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: 0.75rem;
	color: rgba(79, 70, 229, 0.8);
	font-weight: 600;
	margin: 0;
}

.app-bar-content h1 {
	font-size: clamp(1.7rem, 3vw, 2.6rem);
	letter-spacing: -0.02em;
	margin: 0;
}

.app-bar-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.chip {
	border: 1px solid rgba(79, 70, 229, 0.3);
	background: rgba(255, 255, 255, 0.7);
	color: #1f2937;
	padding: 0.4rem 0.85rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.9rem;
	box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	text-decoration: none;
}

.chip.secondary {
	background: var(--primary-container);
	color: var(--on-primary-container);
}

.menu {
	position: relative;
}

.menu-summary {
	list-style: none;
	cursor: pointer;
}

.menu-summary::-webkit-details-marker {
	display: none;
}

.menu-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 0.6rem);
	background: var(--surface);
	border: 1px solid rgba(148, 163, 184, 0.3);
	border-radius: 14px;
	min-width: 190px;
	box-shadow: var(--shadow-soft);
	padding: 0.35rem;
	display: none;
	gap: 0.25rem;
	z-index: 10;
}

.menu[open] .menu-panel {
	display: grid;
}

.menu-item {
	border: none;
	background: transparent;
	text-align: left;
	padding: 0.55rem 0.75rem;
	border-radius: 10px;
	color: var(--on-surface);
	font-weight: 600;
	cursor: pointer;
	width: 100%;
}

a.menu-item {
	text-decoration: none;
	display: block;
}

.menu-profile {
	cursor: default;
	display: grid;
	gap: 0.2rem;
}

.menu-profile small {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.65rem;
	color: var(--muted);
}

.menu-profile span {
	font-weight: 600;
}

.menu-item:hover {
	background: rgba(79, 70, 229, 0.08);
}

.menu-item:focus-visible {
	outline: 2px solid rgba(14, 165, 233, 0.35);
	outline-offset: 2px;
}

.menu-divider {
	height: 1px;
	background: rgba(148, 163, 184, 0.35);
	margin: 0.25rem 0.35rem;
}

.tagline {
	color: var(--muted);
	margin-top: 0.5rem;
}

.page {
	max-width: 980px;
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
}

.stack {
	display: grid;
	gap: 1.5rem;
}

.card {
	width: 100%;
	background: var(--surface);
	padding: 2.25rem;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	border: 1px solid rgba(148, 163, 184, 0.25);
}

.form {
	display: grid;
	gap: 1.25rem;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

@media (max-width: 640px) {
	.form-row {
		grid-template-columns: 1fr;
	}
}

label {
	display: grid;
	gap: 0.5rem;
	font-weight: 600;
	color: #1f2937;
}

.required {
	color: #dc2626;
	font-weight: 600;
}

input,
select {
	padding: 0.85rem 0.9rem;
	border: 1px solid transparent;
	border-radius: 12px;
	font-size: 1rem;
	background: var(--surface-2);
	box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
	transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
	font-family: inherit;
}

input::placeholder {
	color: var(--muted);
	opacity: 0.7;
}

select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	padding-right: 2.5rem;
}

input:focus,
select:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
	border: 1px solid rgba(79, 70, 229, 0.6);
}

input:focus-visible,
select:focus-visible {
	outline: 2px solid rgba(14, 165, 233, 0.35);
	outline-offset: 2px;
}

.form-terms {
	margin-top: 0.5rem;
}

.checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	font-weight: 500;
	cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 6px;
	margin-top: 0.1rem;
	accent-color: var(--primary);
	cursor: pointer;
}

.checkbox-label span {
	line-height: 1.5;
}

.modal-content {
	color: var(--on-surface);
	line-height: 1.6;
}

.modal-content ul {
	padding-left: 1.25rem;
	margin: 0.75rem 0;
}

.modal-content li {
	margin-bottom: 0.5rem;
}

button {
	padding: 0.8rem 1.2rem;
	border: none;
	background: var(--primary);
	color: var(--on-primary);
	border-radius: 999px;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	box-shadow: var(--shadow-soft);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover {
	transform: translateY(-1px);
	filter: brightness(1.03);
}

button:active {
	transform: translateY(0);
}

button:focus-visible {
	outline: 2px solid rgba(14, 165, 233, 0.45);
	outline-offset: 3px;
}

button.secondary {
	background: var(--primary-container);
	color: var(--on-primary-container);
}

button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.message {
	min-height: 1.5rem;
	color: #b91c1c;
	font-weight: 500;
}

.message.error {
	color: #b91c1c;
	background: #fef2f2;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	border: 1px solid #fecaca;
}

.message.success {
	color: #047857;
	background: #ecfdf5;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	border: 1px solid #a7f3d0;
}

.muted {
	color: var(--muted);
}

.bullets {
	padding-left: 1.25rem;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
}

.panel {
	border: 1px solid rgba(148, 163, 184, 0.35);
	padding: 1.25rem;
	border-radius: 14px;
	background: var(--surface-3);
	box-shadow: var(--shadow-soft);
}

.actions {
	margin-top: 1.5rem;
	text-align: right;
}

a {
	color: var(--primary);
	text-decoration: none;
	font-weight: 600;
}

a:hover {
	text-decoration: underline;
}

.modal {
	position: fixed;
	inset: 0;
	display: none;
	place-items: center;
	padding: 1.5rem;
	z-index: 20;
}

.modal:target {
	display: grid;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(4px);
	display: block;
	text-decoration: none;
}

.modal-card {
	position: relative;
	background: var(--surface);
	border-radius: 18px;
	padding: 1.75rem;
	width: min(560px, 90vw);
	box-shadow: var(--shadow);
	border: 1px solid rgba(148, 163, 184, 0.35);
	z-index: 1;
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.modal-title {
	font-size: 1.25rem;
	margin: 0;
}

.modal-close {
	border: none;
	background: var(--surface-2);
	border-radius: 999px;
	padding: 0.4rem 0.75rem;
	font-weight: 600;
	cursor: pointer;
}

.faq {
	display: grid;
	gap: 0.75rem;
	margin: 0;
}

.faq dt {
	font-weight: 700;
}

.faq dd {
	margin: 0;
	color: var(--muted);
}

.reveal {
	opacity: 0;
	transform: translateY(12px);
	animation: reveal 0.6s ease forwards;
	animation-delay: var(--reveal-delay, 0ms);
}

.delay-1 {
	--reveal-delay: 60ms;
}

.delay-2 {
	--reveal-delay: 120ms;
}

.delay-3 {
	--reveal-delay: 180ms;
}

.delay-4 {
	--reveal-delay: 240ms;
}

.delay-5 {
	--reveal-delay: 300ms;
}

@keyframes reveal {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.reveal {
		animation: none;
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 640px) {
	.page {
		padding: 1.5rem 1rem 2.5rem;
	}

	.card {
		padding: 1.75rem;
	}

	.app-bar-content {
		padding: 1.5rem 1rem 1rem;
		flex-direction: column;
		text-align: center;
	}

	.app-bar-main {
		text-align: center;
	}
}
