@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
	--bg: #ffffff;
	--fg: #1f2933;
	--muted: #6b7280;
	--border: #e5e7eb;
	--brand-main: #00246b;
	--brand-light: #47649d;

	--radius: 3px;
	--surface-radius: 8px;
	--surface-border: #dde5ef;
	--surface-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
	--surface-shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.1);
	--surface-subtle: #f8fafc;
	--container: 1100px;
}

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

html,
body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
		"Segoe UI", Roboto, sans-serif;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 1.25rem;
}

/* Layout */
.layout-main {
	min-height: calc(100vh - 80px - 48px);
	padding: 1rem 0;
}

/* Headings */
h1,
h2,
h3 {
	margin: 0 0 0.2em;
	font-weight: 600;
	letter-spacing: 0;
}

h1 {
	font-size: 2rem;
	line-height: 1.25;
}

h2 {
	font-size: 1.5rem;
	line-height: 1.3;
}

h3 {
	font-size: 1.15rem;
}

/* Text */
p {
	margin: 0 0 1rem;
}

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

/* Surface */
.surface-panel {
	overflow: hidden;
	border: 1px solid var(--surface-border);
	border-radius: var(--surface-radius);
	background: var(--bg);
	box-shadow: var(--surface-shadow-strong);
}

/* Button */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	max-width: 100%;
	min-height: 38px;
	padding: 0.46rem 0.78rem;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: transparent;
	color: var(--fg);
	font: inherit;
	line-height: 1.2;
	text-align: center;
	white-space: normal;
	overflow-wrap: anywhere;
	cursor: pointer;
	transition:
		background-color 150ms ease,
		border-color 150ms ease,
		box-shadow 150ms ease,
		color 150ms ease,
		transform 150ms ease;
}

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

.btn:focus-visible {
	outline: 2px solid var(--brand-main);
	outline-offset: 2px;
}

.btn-primary {
	background: var(--brand-main);
	color: #fff;
	border-color: var(--brand-main);
}

.btn-secondary {
	background: var(--bg);
	color: var(--brand-main);
}

.btn-secondary:hover {
	border-color: var(--brand-main);
	background: #f5f8ff;
}

/* Badge */
.badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	max-width: 100%;
	padding: 0.28rem 0.55rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	white-space: normal;
	overflow-wrap: anywhere;
}

.badge--neutral {
	border-color: var(--border);
	background: var(--surface-subtle);
	color: #334155;
}

.badge--format {
	border-color: #cde7dc;
	background: #f0fbf6;
	color: #0f6b4d;
}

.badge--pin {
	gap: 0.45rem;
	border-color: #bfd4f3;
	background: #f5f8ff;
	color: var(--brand-main);
}

.badge__label {
	font: inherit;
}

.badge__code {
	color: inherit;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
		"Liberation Mono", monospace;
	font-size: 0.86rem;
	font-weight: 800;
	letter-spacing: 0.1em;
}

/* Credential card */
.card {
	--card-action-color: var(--brand-main);
	--card-action-bg: #f5f8ff;
	--card-action-bg-hover: #eaf0ff;

	display: flex;
	min-height: 100%;
	overflow: hidden;
	border: 1px solid var(--surface-border);
	border-radius: var(--surface-radius);
	background: var(--bg);
	color: var(--fg);
	flex-direction: column;
	box-shadow: var(--surface-shadow);
}

.card--interactive {
	cursor: pointer;
	transition:
		border-color 160ms ease,
		box-shadow 160ms ease,
		transform 160ms ease;
}

.card--interactive:hover {
	border-color: #b7c7dd;
	box-shadow: var(--surface-shadow-strong);
	transform: translateY(-2px);
}

.card--interactive:focus-visible {
	border-color: var(--brand-main);
	box-shadow:
		0 0 0 3px rgba(0, 36, 107, 0.16),
		var(--surface-shadow-strong);
	outline: none;
}

.card-visual {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 92px;
	padding: 1rem;
	overflow: hidden;
	background: var(--credential-accent);
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--credential-accent) 96%, #ffffff), #ffffff);
}

.card-visual__logo {
	flex: none;
	width: 56px;
	height: 56px;
	object-fit: contain;
}

.card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1rem;
}

.card-title {
	flex: 1;
	min-width: 0;
	margin: 0;
	color: var(--credential-text);
	font-size: 1.18rem;
	font-weight: 600;
	line-height: 1.25;
	overflow: hidden;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.card-desc {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
	line-height: 1.45;
	min-height: 2.6rem;
	overflow: hidden;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.9rem;
	margin-top: auto;
	padding-top: 0.8rem;
	border-top: 1px solid #edf2f7;
}

.card-footer__copy {
	display: grid;
	gap: 0.12rem;
	min-width: 0;
}

.card-footer__title {
	font-size: 0.94rem;
	font-weight: 600;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.card-footer__meta {
	color: var(--muted);
	font-size: 0.78rem;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.card-arrow {
	position: relative;
	flex: none;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid #d7e0ec;
	border-radius: 999px;
	background: var(--card-action-bg);
	transition:
		background-color 140ms ease,
		border-color 140ms ease,
		transform 140ms ease;
}

.card-arrow::before,
.card-arrow::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	display: block;
}

.card-arrow::before {
	width: 0.78rem;
	height: 2px;
	background: var(--card-action-color);
	transform: translate(-50%, -50%);
}

.card-arrow::after {
	width: 0.42rem;
	height: 0.42rem;
	border-top: 2px solid var(--card-action-color);
	border-right: 2px solid var(--card-action-color);
	transform: translate(-30%, -50%) rotate(45deg);
}

.card--interactive:hover .card-arrow,
.card--interactive:focus-visible .card-arrow {
	border-color: var(--card-action-color);
	background: var(--card-action-bg-hover);
	transform: translateX(2px);
}

/* Hero */
.hero {
	padding: 1.5rem 0 1rem;
}

.subtitle {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

/* Catalog */
.catalog {
	padding: 1rem 0 2rem;
}

@media (max-width: 520px) {
	.container {
		padding: 0 1rem;
	}

	.layout-main {
		padding: 0.75rem 0;
	}

	.hero {
		padding: 1.15rem 0 0.8rem;
	}

	h1 {
		font-size: 1.75rem;
		line-height: 1.2;
	}

	h2 {
		font-size: 1.35rem;
	}

	h3 {
		font-size: 1.08rem;
		line-height: 1.25;
	}

	.subtitle {
		font-size: 0.92rem;
		line-height: 1.45;
	}

	.catalog {
		padding: 0.75rem 0 2rem;
	}

	.surface-panel {
		box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
	}

	.btn {
		min-height: 40px;
	}

	.card {
		box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
	}

	.card-visual {
		gap: 0.75rem;
		min-height: 80px;
		padding: 0.85rem;
	}

	.card-visual__logo {
		width: 48px;
		height: 48px;
	}

	.card-title {
		font-size: 1.06rem;
	}

	.card-body {
		gap: 0.55rem;
		padding: 0.85rem;
	}

	.card-desc {
		min-height: 0;
		font-size: 0.86rem;
		line-height: 1.4;
		-webkit-line-clamp: 2;
	}

	.badge {
		font-size: 0.68rem;
	}

	.card-footer {
		gap: 0.7rem;
		padding-top: 0.7rem;
	}

	.card-footer__title {
		font-size: 0.9rem;
	}

	.card-footer__meta {
		font-size: 0.74rem;
	}

	.card-arrow {
		width: 2rem;
		height: 2rem;
	}
}

@media (max-width: 420px) {
	h1 {
		font-size: 1.62rem;
	}

	.badge {
		justify-self: start;
	}
}

@media (max-width: 360px) {
	.container {
		padding: 0 0.875rem;
	}

	h1 {
		font-size: 1.5rem;
		line-height: 1.18;
	}

	h2 {
		font-size: 1.22rem;
	}

	h3 {
		font-size: 1rem;
	}

	.subtitle {
		font-size: 0.88rem;
	}

	.btn {
		padding-right: 0.65rem;
		padding-left: 0.65rem;
	}

	.card-visual {
		min-height: 72px;
		padding: 0.75rem;
	}

	.card-visual__logo {
		width: 42px;
		height: 42px;
	}

	.card-title {
		font-size: 1rem;
	}

	.card-body {
		padding: 0.75rem;
	}

	.card-footer {
		align-items: flex-end;
	}
}
