/* Kisan Kisht: the whole site's styles. Colours and fonts come from the tokens below. */

/*
 * Noto Sans, served from public/assets/fonts (SIL Open Font License). One variable file
 * per script covers weights 400-700; the browser loads a file only when a page uses
 * its characters (Hindi pages: Devanagari and Latin; English pages: Latin).
 */
@font-face {
	font-family: 'Noto Sans';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('/public/assets/fonts/noto-sans-devanagari.woff2') format('woff2');
	unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

@font-face {
	font-family: 'Noto Sans';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('/public/assets/fonts/noto-sans-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Noto Sans';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('/public/assets/fonts/noto-sans-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* One accent, sky blue; everything else white and gray. */
	--kk-blue: #0669a5;
	--kk-blue-dark: #05568a;
	--kk-ink: #1d2226;
	--kk-ink-soft: #474f56;
	--kk-ink-muted: #6b737a;
	--kk-line: #d9dde1;
	--kk-line-strong: #b9c0c6;
	--kk-gray: #f4f5f6;
	--kk-alert: #b3402a;
	--kk-white: #fff;

	--kk-font: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
	--kk-page: 960px;
}

/* ------------------------------------------------------------------ *
 * Base
 * ------------------------------------------------------------------ */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

html[lang='hi'] body {
	line-height: 1.7;
}

body {
	margin: 0;
	background: var(--kk-white);
	color: var(--kk-ink);
	font-family: var(--kk-font);
	font-size: 16px;
	line-height: 1.6;
	overflow-x: hidden;
	/* The footer stays at the bottom of the screen on short pages. */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

main {
	flex: 1 0 auto;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	line-height: 1.25;
	text-wrap: pretty;
}

p,
ul,
ol {
	margin: 0;
}

a {
	color: var(--kk-blue);
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--kk-blue);
	outline-offset: 2px;
}

svg {
	flex: none;
}

.wrap {
	width: 100%;
	max-width: calc(var(--kk-page) + 40px);
	margin: 0 auto;
	padding: 0 20px;
}

@media (max-width: 480px) {
	.wrap {
		padding: 0 16px;
	}
}

.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	left: 16px;
	top: 12px;
	z-index: 20;
	padding: 8px 14px;
	border: 1px solid var(--kk-line-strong);
	background: var(--kk-white);
}

/* ------------------------------------------------------------------ *
 * Header and menu: the logo and the menu on one row
 * ------------------------------------------------------------------ */

.header {
	border-top: 4px solid var(--kk-blue);
	border-bottom: 1px solid var(--kk-line);
	background: var(--kk-white);
}

.header-top {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 68px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--kk-ink);
	font-size: 21px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.brand img {
	width: 34px;
	height: 34px;
}

.brand b {
	color: var(--kk-blue);
}

.menu-button {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--kk-line-strong);
	background: var(--kk-white);
	color: var(--kk-ink);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.menu-button[aria-expanded='true'] {
	border-color: var(--kk-blue);
	color: var(--kk-blue);
}

.nav {
	margin-left: auto;
}

.nav ul {
	display: flex;
	padding: 0;
	list-style: none;
}

.nav a {
	display: flex;
	align-items: center;
	min-height: 68px;
	padding: 0 12px;
	color: var(--kk-ink-soft);
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.nav a:hover {
	color: var(--kk-blue);
}

/* The other language's homepage, beside the menu (and beside the Menu button on phones). */
.lang {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid var(--kk-line-strong);
	color: var(--kk-ink);
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.lang:hover {
	border-color: var(--kk-blue);
	color: var(--kk-blue);
}

/* Below this width the menu folds into the Menu button, and opens under the logo row. */
@media (max-width: 880px) {
	.header-top {
		flex-wrap: wrap;
		gap: 0 8px;
	}

	/* The logo row keeps its own height when the open menu wraps under it. */
	.brand {
		min-height: 68px;
	}

	.menu-button {
		display: inline-flex;
	}

	.lang {
		min-height: 40px;
		margin-left: auto;
	}

	.nav {
		display: none;
		order: 3;
		flex-basis: calc(100% + 40px);
		margin: 0 -20px;
		border-top: 1px solid var(--kk-line);
	}

	.nav.is-open {
		display: block;
	}

	.nav ul {
		flex-direction: column;
	}

	.nav li + li {
		border-top: 1px solid var(--kk-line);
	}

	.nav a {
		min-height: 0;
		padding: 13px 20px;
	}
}

/* Small phones: the Menu button shows only its icon, so the logo, language and menu fit one row. */
@media (max-width: 400px) {
	.menu-button {
		padding: 0 10px;
	}

	.menu-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.lang {
		padding: 0 10px;
	}

	.brand {
		gap: 8px;
		font-size: 18px;
	}

	.brand img {
		width: 30px;
		height: 30px;
	}
}

@media (max-width: 480px) {
	.nav {
		flex-basis: calc(100% + 32px);
		margin: 0 -16px;
	}

	.nav a {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* ------------------------------------------------------------------ *
 * Homepage: the hero with the status form (white), then the links (gray)
 * ------------------------------------------------------------------ */

.hero {
	padding: clamp(40px, 6vw, 72px) 0 clamp(44px, 6vw, 76px);
	background: var(--kk-white);
	text-align: center;
}

.hero h1 {
	font-size: clamp(24px, 1.3rem + 0.6vw, 28px);
	font-weight: 700;
}

.lead {
	margin-top: 6px;
	color: var(--kk-ink-soft);
}

/* The form's box: the one framed thing on the page, so the eye lands on it. */
.check {
	max-width: 480px;
	margin: 28px auto 0;
	padding: 24px;
	border: 1px solid var(--kk-line-strong);
	border-top: 3px solid var(--kk-blue);
	background: var(--kk-white);
	box-shadow: 0 12px 32px -20px rgb(29 34 38 / 35%);
	text-align: left;
}

@media (max-width: 480px) {
	.check {
		padding: 20px 16px;
	}
}

.label {
	display: block;
	margin-bottom: 6px;
	font-size: 14.5px;
	font-weight: 600;
}

.input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	border: 1px solid var(--kk-line-strong);
	border-radius: 0;
	background: var(--kk-white);
	color: var(--kk-ink);
	font: inherit;
	font-size: 17px;
}

/* Numbers people type in capitals (registration numbers). */
.input.is-upper {
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.input::placeholder {
	color: var(--kk-ink-muted);
	letter-spacing: 0;
	text-transform: none;
}

/* A dropdown in the same look, with a small arrow. */
.select {
	padding-right: 40px;
	background: var(--kk-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236b737a' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center;
	font-size: 16px;
	appearance: none;
	cursor: pointer;
}

.field + .field {
	margin-top: 14px;
}

.input:focus {
	border-color: var(--kk-blue);
	outline: 1px solid var(--kk-blue);
}

.input[aria-invalid='true'] {
	border-color: var(--kk-alert);
	outline-color: var(--kk-alert);
}

.note {
	margin-top: 6px;
	color: var(--kk-alert);
	font-size: 14.5px;
}

.button {
	display: block;
	width: 100%;
	min-height: 48px;
	margin-top: 14px;
	border: 0;
	border-radius: 0;
	background: var(--kk-blue);
	color: var(--kk-white);
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.button:hover {
	background: var(--kk-blue-dark);
}

/* The links: white squares on the gray band. */

/* The last section fills the rest of the screen, down to the footer. */
.main {
	display: flex;
	flex-direction: column;
}

.main > :last-child {
	flex: 1 0 auto;
}

.content {
	padding: clamp(36px, 5vw, 56px) 0;
	border-top: 1px solid var(--kk-line);
	border-bottom: 1px solid var(--kk-line);
	background: var(--kk-gray);
}

.content .wrap {
	max-width: 760px;
}

.content h2 {
	margin-bottom: 16px;
	color: var(--kk-ink-muted);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

.links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 0;
	list-style: none;
}

@media (max-width: 560px) {
	.links {
		grid-template-columns: 1fr;
	}
}

.links a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 56px;
	padding: 12px 16px;
	border: 1px solid var(--kk-line);
	background: var(--kk-white);
	color: var(--kk-ink);
	font-size: 15.5px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease;
}

.links a::after {
	content: '→';
	color: var(--kk-blue);
}

.links a:hover {
	border-color: var(--kk-blue);
	color: var(--kk-blue);
}

/* Pages without a form (About, Privacy, Terms): a shorter title band. */
.hero.is-plain {
	padding: clamp(32px, 4vw, 48px) 0;
}

/* The article under the links: plain reading text on white. A line parts it from a white hero. */

.hero + .article {
	border-top: 1px solid var(--kk-line);
}

.article {
	padding: clamp(40px, 5vw, 64px) 0 clamp(48px, 6vw, 72px);
	background: var(--kk-white);
}

.article .wrap {
	max-width: 720px;
}

.article h2 {
	margin: 36px 0 10px;
	font-size: clamp(20px, 1.1rem + 0.4vw, 22px);
	font-weight: 700;
}

.article h2:first-child {
	margin-top: 0;
}

.article h3 {
	margin: 20px 0 4px;
	font-size: 16.5px;
	font-weight: 700;
}

.article p,
.article li {
	color: var(--kk-ink-soft);
}

.article p + p {
	margin-top: 10px;
}

.article ol,
.article ul {
	display: grid;
	gap: 6px;
	padding-left: 22px;
}

.article li::marker {
	color: var(--kk-blue);
	font-weight: 700;
}

.article strong {
	color: var(--kk-ink);
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */

.footer {
	padding: 24px 0;
	border-top: 1px solid var(--kk-line);
	background: var(--kk-white);
	color: var(--kk-ink-muted);
	font-size: 14px;
}

.footer .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	padding: 0;
	list-style: none;
}

.footer-links a {
	color: var(--kk-ink-soft);
	text-decoration: none;
}

.footer-links a:hover {
	color: var(--kk-blue);
	text-decoration: underline;
}
