/* ==========================================================================
   Boral Foundation — Base elements & typography
   ========================================================================== */

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-base);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--color-text);
	background: var(--color-background);
	-webkit-font-smoothing: antialiased;
}

body.no-scroll {
	overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: var(--fw-bold);
	line-height: var(--lh-heading);
	margin: 0 0 var(--space-4);
	color: var(--color-text);
	letter-spacing: -0.01em;
}

/* Display pair for headline-weight text — see --font-display in tokens.css */
h1, h2, h3 {
	font-family: var(--font-display);
	font-weight: var(--fw-semibold);
	letter-spacing: 0;
	text-wrap: balance;
}

h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-section); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-card-heading); }
h4 { font-size: 1.125rem; }

p {
	margin: 0 0 var(--space-4);
	color: var(--color-text);
}

.lead {
	font-size: var(--fs-body-lg);
	color: var(--color-muted);
}

small, .text-small { font-size: var(--fs-small); }
.text-xsmall { font-size: var(--fs-xsmall); }
.text-muted { color: var(--color-muted); }
.text-on-primary { color: var(--color-on-primary); }

ul, ol {
	padding-left: 1.25em;
}

/* Links inside prose content */
.entry-content a,
.prose a {
	color: var(--color-primary);
	text-underline-offset: 3px;
	text-decoration: underline;
}
.entry-content a:hover,
.prose a:hover {
	color: var(--color-primary-dark);
}

img {
	border-radius: var(--radius-md);
}

/* Accessible focus states — never rely on color alone */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible {
	outline: 2px solid var(--color-focus-ring);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

::selection {
	background: var(--color-accent);
	color: var(--color-on-accent);
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: var(--color-primary-dark);
	color: #fff;
	padding: var(--space-3) var(--space-4);
	border-radius: 0 0 var(--radius-md) 0;
	font-weight: var(--fw-semibold);
}
.skip-link:focus {
	left: 0;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	overflow: hidden;
	position: absolute !important;
	word-wrap: normal !important;
	margin: -1px;
	padding: 0;
}

hr {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: var(--space-8) 0;
}

table {
	border-collapse: collapse;
	width: 100%;
}

/* Bangla text gets slightly more generous leading */
:lang(bn) {
	line-height: 1.8;
}
