/* NotBoxedIn Fund — site stylesheet
   Editorial, typography-led design. No gradients, no glassmorphism. */

:root {
	--ink: #23261f;
	--ink-soft: #55584c;
	--bg: #fbf7ee;
	--bg-alt: #f1e9d8;
	--forest: #2f4429;
	--forest-dark: #1f2f1b;
	--olive: #5d7a1f;
	--terracotta: #9c4a2b;
	--terracotta-dark: #7e3a20;
	--line: #e1d7be;
	--line-on-dark: rgba(255, 255, 255, 0.25);
	--white: #ffffff;
	--max: 1140px;
	--radius: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 18px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	font-family: 'Fraunces', Georgia, serif;
	color: var(--ink);
	line-height: 1.15;
	margin: 0 0 0.5em;
	font-weight: 600;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
@media (min-width: 700px) {
	h1 { font-size: 3.25rem; }
	h2 { font-size: 2.25rem; }
}
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--terracotta); }

.eyebrow {
	display: block;
	font-family: 'Source Sans 3', sans-serif;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--olive);
	margin-bottom: 0.6em;
}

.rule {
	width: 56px;
	height: 3px;
	background: var(--terracotta);
	border: 0;
	margin: 0.9em 0 1.3em;
}
.rule--center { margin-inline: auto; }

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

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--forest);
	color: var(--white);
	padding: 0.75em 1.25em;
	z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Layout helpers */
.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 1.5rem;
}
.section { padding: 4rem 0; }
.section--tight { padding: 2.75rem 0; }
.section--alt { background: var(--bg-alt); }
.section--forest {
	background: var(--forest);
	color: var(--white);
}
.section--forest h1,
.section--forest h2,
.section--forest h3,
.section--forest a { color: var(--white); }
.section--forest a:hover { color: #f0d9c8; }
.section--forest .rule { background: #f0d9c8; }

.center { text-align: center; }
.measure { max-width: 62ch; }
.measure--center { margin-inline: auto; }
.wrap.measure { max-width: 44rem; }

.grid-2 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
}
@media (min-width: 800px) {
	.grid-2 { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}

/* Buttons */
.btn {
	display: inline-block;
	font-family: 'Source Sans 3', sans-serif;
	font-weight: 700;
	font-size: 1rem;
	padding: 0.75em 1.5em;
	border-radius: var(--radius);
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--terracotta); color: var(--white); }
.btn-primary:hover { background: var(--terracotta-dark); color: var(--white); }
.btn-outline {
	background: transparent;
	border-color: currentColor;
	color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.section--forest .btn-outline,
.site-footer .btn-outline { color: var(--white); }
.section--forest .btn-outline:hover,
.site-footer .btn-outline:hover { background: var(--white); color: var(--forest); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.5rem; }

/* Site header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}
.site-header__bar {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0.85rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}
.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand__name {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 600;
	font-size: 1.25rem;
	white-space: nowrap;
}

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0.5em 0.7em;
	cursor: pointer;
}
.nav-toggle__bar {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--ink);
	margin: 4px 0;
}

.main-nav ul {
	list-style: none;
	display: flex;
	gap: 1.75rem;
	margin: 0;
	padding: 0;
}
.main-nav a {
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
	font-size: 1.02rem;
	padding: 0.3em 0.1em;
	border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--terracotta); }
.main-nav a[aria-current="page"] {
	color: var(--forest);
	border-bottom-color: var(--terracotta);
}
.main-nav__cta { display: flex; align-items: center; }
.main-nav a.btn {
	border-bottom: none;
	font-size: 0.95rem;
	padding: 0.5em 1.1em;
}
.main-nav a.btn:hover { color: var(--white); }
.main-nav a.btn[aria-current="page"] { border-bottom: none; }

@media (max-width: 720px) {
	.nav-toggle { display: inline-flex; flex-direction: column; align-items: center; }
	.main-nav {
		display: none;
		position: absolute;
		left: 0; right: 0; top: 100%;
		background: var(--bg);
		border-bottom: 1px solid var(--line);
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 1.5rem 1.25rem; }
	.main-nav li { border-top: 1px solid var(--line); }
	.main-nav li:first-child { border-top: none; }
	.main-nav a { display: block; padding: 0.85em 0; }
	.site-header__bar { position: relative; }
}

/* Grants directory */
.grant {
	border-top: 1px solid var(--line);
	padding: 1.75rem 0;
	display: grid;
	gap: 0.35rem 2rem;
}
.grant:last-child { padding-bottom: 0; }
@media (min-width: 780px) {
	.grant { grid-template-columns: 1fr 1fr 1.4fr; }
}
.grant__name { font-family: 'Fraunces', Georgia, serif; font-size: 1.15rem; font-weight: 600; margin: 0 0 0.15em; }
.grant__meta { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.55; }
.grant__meta a { font-weight: 600; }
.grant__label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--olive);
	display: block;
	margin-bottom: 0.2em;
}
.grant__body { font-size: 0.98rem; }

.donation-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem 2rem;
}
@media (min-width: 700px) {
	.donation-list { grid-template-columns: 1fr 1fr; }
}
.donation {
	border-top: 1px solid var(--line);
	padding-top: 1.1rem;
}
.donation__name { font-family: 'Fraunces', Georgia, serif; font-size: 1.05rem; font-weight: 600; margin: 0 0 0.2em; }
.donation p { font-size: 0.97rem; color: var(--ink-soft); }

/* Forms */
.form-field-row { margin-bottom: 1.3rem; }
.form-field-row label {
	display: block;
	font-weight: 700;
	font-size: 0.95rem;
	margin-bottom: 0.4em;
}
.form-field-row .required { color: var(--terracotta); }
.section--forest .form-field-row .required { color: #f0d9c8; }
.form-field-row input[type="text"],
.form-field-row input[type="email"],
.form-field-row select,
.form-field-row textarea {
	width: 100%;
	font: inherit;
	font-size: 1rem;
	padding: 0.7em 0.8em;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	color: var(--ink);
}
.form-field-row input:focus,
.form-field-row select:focus,
.form-field-row textarea:focus {
	outline: 2px solid var(--terracotta);
	outline-offset: 1px;
}
.form-check { display: flex; align-items: flex-start; gap: 0.6em; font-weight: 400; }
.form-check input { margin-top: 0.35em; }
.radio-row { display: flex; gap: 2rem; flex-wrap: wrap; }
.optional { color: var(--ink-soft); font-weight: 400; font-size: 0.9em; }
.word-count { margin: 0.4em 0 0; font-size: 0.85rem; color: var(--terracotta-dark); font-weight: 600; }
.word-count.word-count--ok { color: var(--ink-soft); font-weight: 400; }
.hp-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice {
	padding: 0.9em 1.1em;
	border-radius: var(--radius);
	background: var(--white);
	color: var(--ink);
	font-weight: 600;
	margin-bottom: 1rem;
}
.form-notice--error { border: 1px solid var(--terracotta); color: var(--terracotta-dark); }
.section--forest .form-notice { background: rgba(255,255,255,0.1); color: var(--white); border: 1px solid var(--line-on-dark); }

.contact-details dt { font-weight: 700; margin-top: 1rem; }
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin: 0.2em 0 0; color: var(--ink-soft); }

.map-note {
	border: 1px dashed var(--line);
	border-radius: var(--radius);
	padding: 1rem 1.2rem;
	font-size: 0.95rem;
	color: var(--ink-soft);
	margin: 1.5rem 0;
}

/* Founder portrait */
.portrait {
	border: 1px solid var(--line);
	padding: 0.6rem;
	background: var(--white);
}
.portrait figcaption {
	font-size: 0.9rem;
	color: var(--ink-soft);
	font-style: italic;
	margin-top: 0.6rem;
	text-align: center;
}

/* Footer */
.site-footer {
	background: var(--forest-dark);
	color: var(--white);
	padding: 3.5rem 0 2rem;
}
.site-footer a { color: #f0d9c8; }
.footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	margin-bottom: 2.5rem;
}
@media (min-width: 700px) {
	.footer-grid { grid-template-columns: 1.2fr 1fr; }
}
.footer-grid h3 { color: var(--white); font-size: 1.1rem; }
.site-footer p { color: rgba(255,255,255,0.82); }
.footer-bottom {
	border-top: 1px solid var(--line-on-dark);
	padding-top: 1.25rem;
	font-size: 0.88rem;
	color: rgba(255,255,255,0.65);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: space-between;
}
.footer-bottom a { color: rgba(255,255,255,0.85); }

.hero-logo {
	width: 90%;
	max-width: 460px;
	height: auto;
	margin: 1.5rem auto 0;
}

/* Utility */
.visually-hidden {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
}
