:root {
	--paper: #f8f1e6;
	--paper-light: #fffaf2;
	--ink: #271b14;
	--muted: #665a4d;
	--line: #ded1c2;
	--gold: #a97620;
	--green: #315a42;
	--teal: #33656d;
	--rust: #8f4630;
	--footer: #241912;
	--shadow: 0 18px 42px rgba(39, 27, 20, .14);
	--radius: 8px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--ink);
	background: var(--paper-light);
	font-family: "Noto Sans Tamil", Latha, Arial, sans-serif;
	line-height: 1.72;
}

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

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

a:hover,
a:focus {
	color: var(--gold);
}

.container {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
}

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

.skip-link:focus {
	position: fixed;
	z-index: 1000;
	top: 12px;
	left: 12px;
	width: auto;
	height: auto;
	padding: 10px 14px;
	background: var(--ink);
	color: #fff;
	clip: auto;
}

.mainbar__inner {
	display: flex;
	align-items: center;
}

.mainbar {
	position: sticky;
	z-index: 50;
	top: 0;
	background: rgba(255, 250, 242, .96);
	border-bottom: 1px solid rgba(222, 209, 194, .8);
	backdrop-filter: blur(14px);
}

.mainbar__inner {
	min-height: 84px;
	gap: 28px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 260px;
	font-family: Georgia, "Noto Serif Tamil", serif;
	font-weight: 700;
	font-size: 1.18rem;
	line-height: 1.25;
}

.brand img {
	width: 58px;
	height: 58px;
	object-fit: contain;
	flex: 0 0 auto;
}

.primary-nav {
	margin-left: auto;
}

.primary-nav ul {
	display: flex;
	align-items: center;
	gap: clamp(16px, 2.2vw, 34px);
	padding: 0;
	margin: 0;
	list-style: none;
}

.primary-nav a {
	position: relative;
	display: block;
	padding: 28px 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: .98rem;
}

.primary-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 24px;
	height: 2px;
	background: var(--gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .2s ease;
}

.primary-nav .current-menu-item > a::after,
.primary-nav a:hover::after,
.primary-nav a:focus::after {
	transform: scaleX(1);
}

.nav-toggle,
.search-toggle {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 0;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
}

.nav-toggle {
	display: none;
	gap: 4px;
}

.nav-toggle span:not(.screen-reader-text) {
	width: 24px;
	height: 2px;
	background: currentColor;
}

.search-toggle span {
	width: 19px;
	height: 19px;
	border: 2px solid currentColor;
	border-radius: 50%;
	position: relative;
}

.search-toggle span::after {
	content: "";
	position: absolute;
	width: 8px;
	height: 2px;
	right: -6px;
	bottom: -3px;
	background: currentColor;
	transform: rotate(45deg);
}

.site-search {
	display: none;
	border-top: 1px solid var(--line);
	padding: 16px 0;
}

.site-search.is-open {
	display: block;
}

.search-form {
	display: flex;
	gap: 10px;
}

.search-field {
	width: 100%;
	min-height: 46px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0 14px;
	background: #fff;
	font: inherit;
}

.search-form label {
	flex: 1;
}

.search-form button,
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border: 1px solid var(--green);
	border-radius: var(--radius);
	padding: 0 18px;
	background: var(--green);
	color: #fff;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.button:hover,
.button:focus,
.search-form button:hover,
.search-form button:focus {
	background: var(--teal);
	border-color: var(--teal);
	color: #fff;
}

.button--dark {
	background: var(--ink);
	border-color: var(--ink);
}

.hero {
	min-height: min(590px, calc(100vh - 84px));
	background-position: center;
	background-size: cover;
	display: flex;
	align-items: center;
	position: relative;
	overflow: hidden;
}

.hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 50px;
	background: var(--paper);
	clip-path: polygon(0 42%, 8% 58%, 18% 46%, 28% 62%, 40% 48%, 52% 60%, 64% 43%, 76% 58%, 88% 46%, 100% 58%, 100% 100%, 0 100%);
}

.hero__inner {
	position: relative;
	z-index: 1;
	padding: 68px 0 104px;
}

.eyebrow {
	margin: 0 0 14px;
	color: var(--green);
	font-size: .82rem;
	font-weight: 800;
	text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.section-heading h2,
.split-section h2 {
	margin: 0;
	font-family: Georgia, "Noto Serif Tamil", serif;
	line-height: 1.08;
}

.hero h1 {
	max-width: 740px;
	font-size: 3.3rem;
}

.hero h1 em {
	display: block;
	color: var(--gold);
	font-weight: 400;
	font-style: italic;
}

.hero p:not(.eyebrow) {
	max-width: 540px;
	margin: 20px 0 26px;
	font-size: 1rem;
	color: #3f3328;
}

.section {
	padding: 68px 0;
	background: var(--paper-light);
}

.section--paper {
	background: linear-gradient(rgba(248, 241, 230, .94), rgba(248, 241, 230, .94));
}

.section-heading {
	text-align: center;
	margin-bottom: 34px;
}

.section-heading h2,
.split-section h2 {
	font-size: 1.9rem;
}

.section-heading::after {
	content: "";
	display: block;
	width: 84px;
	height: 3px;
	margin: 14px auto 0;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.heritage-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

.heritage-card {
	border: 1px solid rgba(102, 90, 77, .2);
	border-radius: var(--radius);
	background: rgba(255, 250, 242, .92);
	box-shadow: 0 10px 24px rgba(39, 27, 20, .08);
	overflow: hidden;
	text-align: center;
	transition: transform .2s ease, box-shadow .2s ease;
}

.heritage-card:nth-last-child(-n+3) {
	grid-column: span 1;
}

.heritage-card:hover,
.heritage-card:focus-within {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
}

.heritage-card a {
	display: grid;
	grid-template-rows: 160px auto auto 1fr auto;
	min-height: 100%;
	padding-bottom: 22px;
}

.heritage-card img {
	width: 100%;
	height: 160px;
	object-fit: cover;
}

.heritage-card__icon {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	margin: -29px auto 12px;
	border: 4px solid var(--paper-light);
	border-radius: 50%;
	background: var(--green);
	color: #fff;
	font-family: Georgia, serif;
	font-size: 1.35rem;
	font-weight: 700;
}

.heritage-card h3 {
	margin: 0 18px 8px;
	font-family: Georgia, "Noto Serif Tamil", serif;
	font-size: 1.45rem;
}

.heritage-card p {
	margin: 0 22px 14px;
	color: var(--muted);
	font-size: .94rem;
}

.text-link {
	color: var(--gold);
	font-weight: 800;
}

.stats-band {
	background-position: center;
	background-size: cover;
	color: #fff;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
}

.stat {
	min-height: 150px;
	display: grid;
	place-items: center;
	text-align: center;
	padding: 28px;
	border-left: 1px solid rgba(255, 255, 255, .18);
}

.stat:first-child {
	border-left: 0;
}

.stat strong {
	display: block;
	font-family: Georgia, serif;
	font-size: 2.8rem;
	line-height: 1;
}

.stat span {
	display: block;
	max-width: 180px;
	margin-top: 8px;
	font-weight: 700;
}

.split-section {
	display: grid;
	grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
	gap: clamp(32px, 6vw, 70px);
	align-items: center;
}

.split-section p:not(.eyebrow) {
	color: var(--muted);
	font-size: 1.02rem;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.gallery-grid figure {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: var(--radius);
	background: #ddd;
	aspect-ratio: 4 / 3;
}

.gallery-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-grid figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 18px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .72));
	color: #fff;
	font-weight: 800;
}

.page-hero {
	min-height: 300px;
	display: flex;
	align-items: end;
	padding: 70px 0 46px;
	background-position: center;
	background-size: cover;
	color: #fff;
}

.page-hero--plain {
	align-items: center;
	min-height: 260px;
	background: linear-gradient(135deg, var(--green), var(--teal));
}

.page-hero h1 {
	max-width: 920px;
	font-size: 2.35rem;
}

.page-hero p {
	max-width: 820px;
	margin: 14px 0 0;
	color: rgba(255, 255, 255, .88);
	font-size: 1rem;
}

.page-hero .eyebrow {
	color: #f4d491;
}

.content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 30px;
	align-items: start;
}

.content-layout--single {
	grid-template-columns: minmax(0, 1fr);
	max-width: 980px;
}

.content-panel,
.post-card {
	border: 1px solid rgba(102, 90, 77, .18);
	border-radius: var(--radius);
	background: rgba(255, 250, 242, .94);
	box-shadow: 0 12px 28px rgba(39, 27, 20, .08);
}

.content-panel {
	padding: 38px;
}

.content-panel h2 {
	margin: 1.5em 0 .45em;
	color: var(--green);
	font-family: Georgia, "Noto Serif Tamil", serif;
	font-size: 1.45rem;
	line-height: 1.28;
}

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

.content-panel p {
	margin: 0 0 1.15em;
	color: #352920;
	font-size: 1rem;
}

.contact-form-block {
	margin-top: 36px;
	padding-top: 28px;
	border-top: 1px solid var(--line);
}

.contact-form-block h2 {
	margin-top: 0;
}

.contact-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.contact-form p {
	margin: 0;
}

.contact-form__full {
	grid-column: 1 / -1;
}

.contact-form label {
	display: block;
	margin-bottom: 7px;
	color: var(--ink);
	font-weight: 800;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 12px 14px;
	background: #fff;
	color: var(--ink);
	font: inherit;
}

.contact-form textarea {
	resize: vertical;
}

.form-notice {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: var(--radius);
	font-weight: 700;
}

.form-notice--success {
	background: rgba(49, 90, 66, .12);
	color: var(--green);
}

.form-notice--error {
	background: rgba(143, 70, 48, .13);
	color: var(--rust);
}

.post-list {
	display: grid;
	gap: 18px;
}

.post-card {
	padding: 24px;
}

.post-card h2 {
	margin: 0 0 8px;
	font-family: Georgia, serif;
}

.site-footer {
	background:
		linear-gradient(135deg, rgba(36, 25, 18, .98), rgba(55, 36, 24, .96)),
		var(--footer);
	color: rgba(255, 255, 255, .78);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.35fr .75fr .75fr 1fr;
	gap: 42px;
	padding: 54px 0;
}

.brand--footer {
	min-width: 0;
	color: #fff;
}

.brand--footer img {
	width: 48px;
	height: 48px;
	filter: brightness(1.16);
}

.footer-brand p {
	max-width: 360px;
}

.site-footer h2 {
	margin: 0 0 16px;
	color: #fff;
	font-family: Georgia, serif;
	font-size: 1.12rem;
}

.site-footer ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.site-footer li + li {
	margin-top: 8px;
}

.footer-contact li {
	padding-left: 0;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, .12);
}

.footer-bottom .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 58px;
	font-size: .88rem;
}

.footer-bottom p {
	margin: 0;
}

@media (max-width: 980px) {
	.mainbar__inner {
		min-height: 76px;
	}

	.brand {
		min-width: 0;
		max-width: calc(100% - 120px);
	}

	.nav-toggle {
		display: inline-grid;
		margin-left: auto;
	}

	.primary-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 76px;
		background: var(--paper-light);
		border-top: 1px solid var(--line);
		border-bottom: 1px solid var(--line);
	}

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

	.primary-nav ul {
		display: block;
		width: min(1120px, calc(100% - 32px));
		margin: 0 auto;
		padding: 10px 0;
	}

	.primary-nav a {
		padding: 13px 0;
	}

	.primary-nav a::after {
		bottom: 8px;
		right: auto;
		width: 44px;
	}

	.hero {
		min-height: 520px;
		background-position: 58% center;
	}

	.hero h1 {
		font-size: 2.85rem;
	}

	.section-heading h2,
	.split-section h2 {
		font-size: 1.75rem;
	}

	.page-hero h1 {
		font-size: 2rem;
	}

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

	.stats-grid,
	.footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.split-section,
	.content-layout {
		grid-template-columns: 1fr;
	}

}

@media (max-width: 680px) {
	.container {
		width: min(100% - 24px, 1120px);
	}

	.brand {
		font-size: .92rem;
	}

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

	.hero {
		min-height: 500px;
		background-position: 66% center;
	}

	.hero__inner {
		padding: 52px 0 86px;
	}

	.hero h1 {
		font-size: 2.25rem;
	}

	.section-heading h2,
	.split-section h2 {
		font-size: 2.05rem;
	}

	.page-hero h1 {
		font-size: 1.85rem;
	}

	.stat strong {
		font-size: 2.3rem;
	}

	.content-panel h2 {
		font-size: 1.28rem;
	}

	.content-panel {
		padding: 22px;
	}

	.contact-form {
		grid-template-columns: 1fr;
	}

	.heritage-grid,
	.stats-grid,
	.gallery-grid,
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.stat {
		min-height: 126px;
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, .18);
	}

	.stat:first-child {
		border-top: 0;
	}

	.page-hero {
		min-height: 310px;
		padding: 74px 0 44px;
	}

	.footer-bottom .container,
	.search-form {
		align-items: stretch;
		flex-direction: column;
		padding: 14px 0;
	}
}
