/* Talking Climate — base styles & brand tokens.
   Loaded on every front-end page. Page-specific CSS (home.css, cards.css, …)
   layers on top and is enqueued conditionally. */

:root {
	--navy: #1B2D5B;
	--slate: #2C3A4A;
	--pumpkin: #F28030;
	--sienna: #D4935A;
	--cerulean: #33C6F5;
	--cream: #F0E0B0;
	--offwhite: #F7F6F2;
	--sand: #E8E6DF;
	--white: #FFFFFF;

	--tc-font: 'Ubuntu', system-ui, -apple-system, sans-serif;
	--tc-maxw: 1280px;  /* content column (standard max-w-7xl); prose stays measured per-block */
	--tc-radius: 12px;  /* matches the design-system --r-md (brand.css) */
	--tc-shadow: 0 6px 24px rgba(27, 45, 91, 0.08);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--tc-font);
	font-weight: 300;
	color: var(--slate);
	background: var(--offwhite);
	line-height: 1.6;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; color: var(--navy); }

a { color: var(--pumpkin); text-decoration: none; }
a:hover { color: var(--navy); }

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

.tc-container,
.tc-main > .tc-container {
	max-width: var(--tc-maxw);
	margin-inline: auto;
	padding: 48px 24px;
}

/* Accessibility: visually-hidden helper + skip link. */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.tc-skip-link:focus {
	position: fixed; top: 8px; left: 8px;
	width: auto; height: auto; clip: auto;
	z-index: 1000; padding: 10px 16px;
	background: var(--navy); color: var(--white); border-radius: 8px;
}

/* Baseline nav (page-specific designs override). */
.tc-nav__inner {
	max-width: var(--tc-maxw);
	margin-inline: auto;
	display: flex; align-items: center; gap: 24px;
	padding: 16px 24px;
}
.tc-nav__brand { font-weight: 700; color: var(--navy); }
.tc-nav__links { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.tc-nav__links a { color: var(--slate); font-weight: 500; }
.tc-nav__link.is-active { color: var(--pumpkin); }
.tc-nav__cta {
	margin-left: auto;
	background: var(--pumpkin); color: var(--white);
	padding: 10px 20px; border-radius: 999px; font-weight: 500;
}
.tc-nav--dashboard .tc-nav__links { margin-left: auto; }
body.admin-bar { --tc-admin-bar-offset: 32px; }

@media screen and (max-width: 782px) {
	/* At <=782px WP's admin bar becomes position:absolute (it scrolls away), so a
	   fixed nav must NOT reserve space for it — otherwise page content shows through
	   the gap once scrolled. Pin the nav to the very top. */
	body.admin-bar { --tc-admin-bar-offset: 0px; }
}

/* Public secondary pages mirror the homepage sticky navigation. */
.tc-nav--public {
	position: fixed;
	top: var(--tc-admin-bar-offset, 0);
	left: 0;
	right: 0;
	z-index: 100;
	height: 64px;
	background: rgba(255,255,255,0.98);
	border-bottom: 0.5px solid rgba(27,45,91,0.1);
	box-shadow: 0 2px 16px rgba(0,0,0,0.06);
	backdrop-filter: blur(8px);
}
.tc-nav--public + .tc-main {
	padding-top: 64px;
}
.tc-nav--public .tc-nav__inner {
	max-width: none;
	height: 64px;
	padding: 0 48px;
	justify-content: space-between;
}
.tc-nav--public .tc-nav__brand {
	align-items: center;
	display: flex;
	flex: 0 0 122px;
	height: 64px;
	overflow: hidden;
	width: 122px;
}
.tc-nav--public .tc-nav__brand-logo {
	display: block;
	height: 92px;
	margin-left: -2px;
	object-fit: contain;
	transform: translateY(-1px);
	width: 92px;
}
.tc-nav--public .tc-nav__links {
	align-items: center;
	gap: 32px;
	margin-left: auto;
}
.tc-nav--public .tc-nav__links a {
	color: var(--navy);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.01em;
}
.tc-nav--public .tc-nav__links a:hover,
.tc-nav--public .tc-nav__link.is-active {
	color: var(--pumpkin);
}
.tc-nav--public .tc-nav__cta {
	margin-left: 0;
	background: var(--pumpkin);
	color: var(--white);
	padding: 8px 20px;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 600;
}
.tc-nav--public .tc-nav__cta:hover {
	color: var(--white);
	opacity: 0.9;
}
/* Donate sits to the left of "Stay in Touch": a cerulean pill so the two CTAs read as a
   pair (cerulean + pumpkin) rather than two identical buttons. Navy text because white
   fails contrast on the bright cerulean. */
.tc-nav--public .tc-nav__cta--donate,
.tc-nav--public .tc-nav__cta--donate:hover {
	background: var(--cerulean);
	color: var(--navy);
}

/* Collapsible group (links + CTA). On desktop it's just the right-hand cluster;
   on mobile it becomes the hamburger dropdown panel. */
.tc-nav--public .tc-nav__collapse {
	align-items: center;
	display: flex;
	gap: 32px;
	margin-left: auto;
}
.tc-nav--public .tc-nav__collapse .tc-nav__links { margin-left: 0; }

.tc-nav__toggle {
	background: none;
	border: 0;
	cursor: pointer;
	display: none;
	flex-direction: column;
	height: 18px;
	justify-content: space-between;
	margin-left: auto;
	padding: 0;
	width: 26px;
}
.tc-nav__toggle span {
	background: var(--navy);
	border-radius: 2px;
	display: block;
	height: 2px;
	transition: transform 0.25s, opacity 0.2s;
	width: 100%;
}
.tc-nav--public.nav-open .tc-nav__toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.tc-nav--public.nav-open .tc-nav__toggle span:nth-child(2) { opacity: 0; }
.tc-nav--public.nav-open .tc-nav__toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 760px) {
	.tc-nav__inner {
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 12px 18px;
	}
	.tc-nav__brand {
		flex: 1 1 100%;
	}
	.tc-nav__links {
		flex: 1 1 100%;
		flex-wrap: wrap;
		gap: 12px 18px;
	}
	.tc-nav__cta {
		margin-left: 0;
		padding: 8px 16px;
	}
	.tc-nav--public + .tc-main {
		padding-top: 64px;
	}
	.tc-nav--public .tc-nav__inner {
		align-items: center;
		flex-wrap: nowrap;
		padding: 0 20px;
	}

	/* Show the hamburger; collapse links + CTA into a dropdown panel. */
	.tc-nav--public .tc-nav__toggle { display: flex; }
	.tc-nav--public .tc-nav__collapse {
		background: #fff;
		border-bottom: 0.5px solid rgba(27,45,91,0.1);
		box-shadow: 0 14px 30px rgba(0,0,0,0.12);
		display: none;
		flex-direction: column;
		gap: 0;
		left: 0;
		padding: 8px 20px 18px;
		position: absolute;
		right: 0;
		top: 100%;
		/* The nav is position:fixed, so this panel is anchored to the viewport. Cap it to the
		   space below the bar and scroll internally, else a tall menu overflows off-screen
		   with no way to reach the bottom (e.g. the Join Us CTA). */
		max-height: calc(100vh - 64px - var(--tc-admin-bar-offset, 0px));
		max-height: calc(100dvh - 64px - var(--tc-admin-bar-offset, 0px));
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}
	.tc-nav--public.nav-open .tc-nav__collapse { display: flex; align-items: stretch; }
	.tc-nav--public .tc-nav__links {
		flex-direction: column;
		gap: 0;
		width: 100%;
	}
	.tc-nav--public .tc-nav__links li { width: 100%; }
	.tc-nav--public .tc-nav__links a {
		border-bottom: 0.5px solid rgba(27,45,91,0.08);
		display: block;
		font-size: 16px;
		padding: 15px 4px;
	}
	.tc-nav--public .tc-nav__cta {
		margin-top: 14px;
		padding: 13px;
		text-align: center;
	}
}

/* Baseline footer (homepage supplies the full navy design). */
.tc-footer { background: var(--navy); color: var(--offwhite); margin-top: 64px; }
.tc-footer__inner { max-width: var(--tc-maxw); margin-inline: auto; padding: 48px 24px; }
.tc-footer a { color: var(--cerulean); }

/* --- Auth pages (login / forgot / reset) --- */
.tc-auth { display: flex; justify-content: center; padding: 64px 24px; }
.tc-auth__card {
	width: 100%; max-width: 440px;
	background: var(--white); border-radius: var(--tc-radius);
	box-shadow: var(--tc-shadow); padding: 40px;
}
.tc-auth__title { margin-top: 0; }
.tc-auth__links { font-size: 0.95rem; margin: 12px 0 0; }
.tc-form__row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.tc-form__row label, .login label { font-weight: 500; color: var(--navy); }
.tc-form input[type="text"], .tc-form input[type="password"],
.login input[type="text"], .login input[type="password"] {
	width: 100%; padding: 12px 14px; border: 1px solid var(--sand);
	border-radius: 10px; font: inherit; background: var(--offwhite);
}
.tc-btn, .login .button, .login input[type="submit"] {
	display: inline-block; cursor: pointer; border: 0; font: inherit; font-weight: 500;
	padding: 12px 22px; border-radius: 999px; text-align: center;
}
.tc-btn--primary, .login .button-primary, .login input[type="submit"] {
	background: var(--pumpkin); color: var(--white);
}
.tc-btn--primary:hover, .login input[type="submit"]:hover { background: var(--navy); color: var(--white); }
.tc-btn--ghost { background: transparent; border: 1px solid var(--navy); color: var(--navy); }
.login .login-remember { font-weight: 300; }

/* Notices */
.tc-notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; font-size: 0.95rem; }
.tc-notice--success { background: #e6f6ec; color: #1c6b3a; }
.tc-notice--info { background: #e7f4fc; color: #1b5e85; }
.tc-notice--error { background: #fcecec; color: #9b2222; }

.tc-page__lead { font-size: 1.15rem; color: var(--navy); max-width: 65ch; }

/* --- Accessibility: visible keyboard focus everywhere --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.tc-bookmark:focus-visible,
.tc-nav__link:focus-visible {
	outline: 3px solid var(--cerulean);
	outline-offset: 2px;
	border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
	* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --- Opt-in inactivity auto-logout warning --- */
.tc-autologout { position: fixed; inset: 0; z-index: 1100; display: none; align-items: center; justify-content: center; background: rgba(27,45,91,.5); }
.tc-autologout.is-open { display: flex; }
.tc-autologout__box { background: #fff; border-radius: var(--tc-radius); padding: 28px 32px; max-width: 380px; text-align: center; box-shadow: var(--tc-shadow); }
.tc-autologout__box p { margin: 0 0 16px; color: var(--navy); }
