/*
Theme Name: The Transitions
Theme URI: https://thetransitions.org/
Author: The Transitions
Author URI: https://thetransitions.org/
Description: A block theme for The Transitions — a workers' compensation movement addressing the generational transfer of talent and knowledge. Built around the organisation's torch mark: a warm gold-to-crimson flame on neutral paper, with a "passing the torch" rule that carries the flame from experience leaving to vision entering. Pairs with the Transitions Content plugin, which supplies the webinar library, people, events, news and FAQs.
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-transitions
Tags: block-theme, full-site-editing, nonprofit, education, one-column, custom-logo, accessibility-ready
*/

/* ============================================================
   1. Base
   ============================================================ */

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

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}

body { -webkit-font-smoothing: antialiased; }

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

:where(a):focus-visible,
:where(button):focus-visible,
:where(summary):focus-visible,
:where(input):focus-visible,
:where(textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--flame);
	outline-offset: 3px;
	border-radius: 2px;
}

.tt-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background: var(--wp--preset--color--ink-deep);
	color: var(--wp--preset--color--paper);
	padding: .75rem 1.25rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: .75rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ============================================================
   2. Utility type
   ============================================================ */

.tt-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--tag);
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
	margin: 0 0 1rem;
	display: block;
}

.tt-eyebrow--flame { color: var(--wp--preset--color--ember); }

.has-mono-font-family { letter-spacing: .04em; }

/* ============================================================
   3. Header
   ============================================================ */

.tt-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(245, 246, 243, .93);
	backdrop-filter: saturate(160%) blur(8px);
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.tt-header .wp-block-site-logo img {
	max-height: 44px;
	width: auto;
}

.tt-header .wp-block-navigation__container { gap: 1.6rem; }

.tt-header .wp-block-navigation-item__content {
	color: var(--wp--preset--color--slate);
	text-decoration: none;
	padding-block: .4rem;
	border-bottom: 2px solid transparent;
	transition: color .18s ease, border-color .18s ease;
}

.tt-header .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--ink);
	border-bottom-color: var(--wp--preset--color--flame);
}

.tt-header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--ink);
	border-bottom-color: var(--wp--preset--color--flame);
}

/* ============================================================
   4. Signature: the torch rule
   ============================================================ */

.tt-torch-rule {
	width: 100%;
	max-width: 760px;
	margin-block: 2.75rem 0;
	overflow: visible;
	display: block;
}

.tt-torch-rule__track {
	stroke: var(--wp--preset--color--rule);
	stroke-width: 1;
	fill: none;
}

.tt-torch-rule__path {
	stroke: url(#tt-torch-gradient);
	stroke-width: 2.5;
	fill: none;
	stroke-dasharray: 640;
	stroke-dashoffset: 640;
	animation: tt-draw 1.5s var(--wp--custom--ease, ease-out) .2s forwards;
}

.tt-torch-rule__flame {
	fill: url(#tt-torch-gradient);
	opacity: 0;
	animation: tt-flare .6s ease 1.35s forwards;
	transform-origin: center;
}

.tt-torch-rule__label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 10px;
	letter-spacing: .14em;
	text-transform: uppercase;
	fill: var(--wp--preset--color--slate);
	opacity: 0;
	animation: tt-fade .7s ease 1.5s forwards;
}

.tt-torch-rule__label--in { fill: var(--wp--preset--color--ember); }

@keyframes tt-draw { to { stroke-dashoffset: 0; } }
@keyframes tt-flare { to { opacity: 1; } }
@keyframes tt-fade { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	.tt-torch-rule__path { stroke-dashoffset: 0; }
	.tt-torch-rule__flame,
	.tt-torch-rule__label { opacity: 1; }
}

/* on deep backgrounds */
.has-ink-deep-background-color .tt-torch-rule__track { stroke: rgba(255, 255, 255, .2); }
.has-ink-deep-background-color .tt-torch-rule__label { fill: rgba(255, 255, 255, .62); }
.has-ink-deep-background-color .tt-torch-rule__label--in { fill: var(--wp--preset--color--gold); }

/* ============================================================
   5. Ledger layout (margin column + hairline)
   ============================================================ */

.tt-ledger { display: block; }

@media (min-width: 62rem) {
	.tt-ledger {
		display: grid;
		grid-template-columns: var(--wp--custom--ledger-margin, 188px) minmax(0, 1fr);
		gap: 0 var(--wp--custom--ledger-gap, 3.25rem);
	}

	.tt-ledger__margin {
		position: sticky;
		top: 6.5rem;
		align-self: start;
		padding-top: .35rem;
	}

	.tt-ledger__body {
		border-left: 1px solid var(--wp--preset--color--rule);
		padding-left: var(--wp--custom--ledger-gap, 3.25rem);
		position: relative;
	}

	/* the flame tick at the head of every ledger rule */
	.tt-ledger__body::before {
		content: "";
		position: absolute;
		left: -1.5px;
		top: 0;
		width: 3px;
		height: 46px;
		background: linear-gradient(180deg, #f5a623 0%, #ef582e 55%, #ce2027 100%);
	}

	.has-ink-deep-background-color .tt-ledger__body {
		border-left-color: rgba(255, 255, 255, .18);
	}
}

.tt-ledger__margin-note {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .68rem;
	line-height: 1.6;
	color: var(--wp--preset--color--slate);
}

/* ============================================================
   6. Webinar ledger
   ============================================================ */

.tt-series {
	border-top: 1px solid var(--wp--preset--color--rule);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tt-entry {
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr);
	gap: 0 1.75rem;
	padding-block: 2.25rem;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	position: relative;
}

.tt-entry::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 0;
	height: 1px;
	background: linear-gradient(90deg, #f5a623, #ef582e 60%, #ce2027);
	transition: width .5s var(--wp--custom--ease, ease-out);
}
.tt-entry:hover::after { width: 100%; }

.tt-entry__ref {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1rem;
	font-weight: 600;
	color: var(--wp--preset--color--slate);
	padding-top: .3rem;
	transition: color .2s ease;
}
.tt-entry:hover .tt-entry__ref { color: var(--wp--preset--color--flame); }

.tt-entry__date {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--tag);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
	display: block;
	margin-bottom: .5rem;
}

.tt-entry__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--h3);
	font-weight: 600;
	letter-spacing: -.02em;
	line-height: 1.15;
	margin: 0 0 .75rem;
}
.tt-entry__title a { text-decoration: none; }
.tt-entry__title a:hover { color: var(--wp--preset--color--ember); }

.tt-entry__body {
	color: var(--wp--preset--color--slate);
	max-width: 72ch;
}
.tt-entry__body p { margin-block: 0 1em; }
.tt-entry__body p:last-child { margin-bottom: 0; }

.tt-entry__note {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .72rem;
	letter-spacing: .06em;
	color: var(--wp--preset--color--slate);
	margin-top: 1.4rem;
}

@media (max-width: 40rem) {
	.tt-entry { grid-template-columns: 1fr; gap: .4rem; }
	.tt-entry__ref { padding-top: 0; }
}

/* ============================================================
   7. Handouts / file chips
   ============================================================ */

.tt-handouts {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	margin: 1.4rem 0 0;
	padding: 0;
	list-style: none;
	align-items: center;
}

.tt-handout {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--tag);
	letter-spacing: .07em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--rule);
	background: var(--wp--preset--color--white);
	padding: .55rem .85rem;
	border-radius: 2px;
	transition: border-color .18s ease, color .18s ease;
}
.tt-handout:hover {
	border-color: var(--wp--preset--color--flame);
	color: var(--wp--preset--color--ember);
}

.tt-handout__type {
	font-size: .6rem;
	background: var(--wp--preset--color--paper-alt);
	padding: .12rem .35rem;
	border-radius: 2px;
	color: var(--wp--preset--color--slate);
}

.tt-handout--watch {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}
.tt-handout--watch:hover {
	background: var(--wp--preset--color--flame);
	border-color: var(--wp--preset--color--flame);
	color: var(--wp--preset--color--white);
}
.tt-handout--watch .tt-handout__type {
	background: rgba(255, 255, 255, .16);
	color: inherit;
}

/* ============================================================
   8. People grid
   ============================================================ */

.tt-people {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
	gap: 1px;
	background: var(--wp--preset--color--rule);
	border: 1px solid var(--wp--preset--color--rule);
}

.tt-person { background: var(--wp--preset--color--paper); }

.tt-person__link {
	display: block;
	padding: 1.5rem 1.4rem;
	text-decoration: none;
	height: 100%;
	position: relative;
	transition: background .18s ease;
}
.tt-person__link:hover { background: var(--wp--preset--color--white); }

.tt-person__link::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: linear-gradient(180deg, #f5a623, #ef582e 55%, #ce2027);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .28s var(--wp--custom--ease, ease-out);
}
.tt-person__link:hover::before,
.tt-person__link:focus-visible::before { transform: scaleY(1); }

.tt-person__name {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.12rem;
	font-weight: 600;
	letter-spacing: -.015em;
	color: var(--wp--preset--color--ink);
	display: block;
	margin-bottom: .2rem;
}

.tt-person__org {
	font-size: .92rem;
	line-height: 1.45;
	color: var(--wp--preset--color--slate);
	display: block;
}

.tt-person__cue {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .62rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ember);
	margin-top: .7rem;
	display: block;
	opacity: 0;
	transition: opacity .2s ease;
}
.tt-person__link:hover .tt-person__cue,
.tt-person__link:focus-visible .tt-person__cue { opacity: 1; }

/* ============================================================
   9. Cards — events, news, connect
   ============================================================ */

.tt-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tt-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: 3px;
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	transition: border-color .2s ease, transform .2s ease;
}
.tt-card:hover {
	border-color: var(--wp--preset--color--flame);
	transform: translateY(-2px);
}

.tt-card__meta {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--tag);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ember);
	display: block;
	margin-bottom: .8rem;
}

.tt-card__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.3rem;
	font-weight: 600;
	letter-spacing: -.02em;
	line-height: 1.18;
	margin: 0 0 .6rem;
}

.tt-card__body {
	color: var(--wp--preset--color--slate);
	font-size: .98rem;
	flex: 1;
}
.tt-card__body p:last-child { margin-bottom: 0; }

.tt-card__where {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .72rem;
	letter-spacing: .05em;
	color: var(--wp--preset--color--slate);
	margin-top: .9rem;
}

.tt-card__foot {
	margin-top: 1.35rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--tag);
	letter-spacing: .1em;
	text-transform: uppercase;
}
.tt-card__foot a { color: var(--wp--preset--color--ember); text-decoration: none; }
.tt-card__foot a:hover { text-decoration: underline; }

.tt-event__date {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ember);
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding-bottom: .8rem;
	margin-bottom: 1rem;
	display: block;
}

.tt-empty {
	border: 1px dashed var(--wp--preset--color--rule);
	padding: 2.5rem;
	text-align: center;
	color: var(--wp--preset--color--slate);
	font-family: var(--wp--preset--font-family--mono);
	font-size: .78rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	border-radius: 3px;
}

/* ============================================================
   10. FAQ
   ============================================================ */

.tt-faq {
	border-top: 1px solid var(--wp--preset--color--rule);
	margin: 0;
	padding: 0;
}

.tt-faq__item { border-bottom: 1px solid var(--wp--preset--color--rule); }

.tt-faq__q {
	list-style: none;
	cursor: pointer;
	padding: 1.25rem 2.5rem 1.25rem 0;
	position: relative;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.08rem;
	font-weight: 600;
	letter-spacing: -.01em;
	transition: color .18s ease;
}
.tt-faq__q::-webkit-details-marker { display: none; }
.tt-faq__q:hover { color: var(--wp--preset--color--ember); }

.tt-faq__q::after {
	content: "+";
	position: absolute;
	right: .25rem;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1.2rem;
	color: var(--wp--preset--color--flame);
}
.tt-faq__item[open] .tt-faq__q::after { content: "\2212"; }
.tt-faq__item[open] .tt-faq__q { color: var(--wp--preset--color--ember); }

.tt-faq__a {
	padding: 0 2.5rem 1.6rem 0;
	color: var(--wp--preset--color--slate);
	max-width: 74ch;
}
.tt-faq__a p:last-child { margin-bottom: 0; }

/* ============================================================
   11. Links list
   ============================================================ */

.tt-links {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wp--preset--color--rule);
}
.tt-links li { border-bottom: 1px solid var(--wp--preset--color--rule); }

.tt-links a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.35rem .25rem;
	text-decoration: none;
	transition: padding-left .24s var(--wp--custom--ease, ease-out), color .18s ease;
}
.tt-links a:hover {
	padding-left: 1rem;
	color: var(--wp--preset--color--ember);
}

.tt-links__label {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: -.015em;
}

.tt-links__note {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .68rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
	text-align: right;
	flex-shrink: 0;
}

/* ============================================================
   12. Contact form
   ============================================================ */

.tt-form { max-width: 32rem; }

.tt-field { margin-bottom: 1.35rem; }

.tt-field label {
	display: block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--tag);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
	margin-bottom: .5rem;
}

.tt-field input,
.tt-field textarea {
	width: 100%;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: 2px;
	padding: .8rem .9rem;
	transition: border-color .18s ease;
}
.tt-field input:focus,
.tt-field textarea:focus {
	border-color: var(--wp--preset--color--flame);
	outline-offset: 0;
}
.tt-field textarea { min-height: 8rem; resize: vertical; }

.tt-hp {
	position: absolute !important;
	left: -9999px;
}

.tt-notice {
	padding: .95rem 1.1rem;
	border-radius: 2px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: .76rem;
	letter-spacing: .04em;
	line-height: 1.6;
	margin-bottom: 1.5rem;
}
.tt-notice--ok {
	background: rgba(51, 50, 47, .06);
	border-left: 3px solid var(--wp--preset--color--ink);
}
.tt-notice--err {
	background: rgba(239, 88, 46, .1);
	border-left: 3px solid var(--wp--preset--color--flame);
}

.tt-fineprint {
	font-size: .82rem;
	line-height: 1.6;
	color: var(--wp--preset--color--slate);
	margin-top: 1.25rem;
}

/* ============================================================
   13. Post lists
   ============================================================ */

.tt-posts { list-style: none; margin: 0; padding: 0; }

.tt-post {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding-block: 2rem;
}

.tt-post__date {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--tag);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
	display: block;
	margin-bottom: .5rem;
}

.wp-block-post-title a { text-decoration: none; }
.wp-block-post-title a:hover { color: var(--wp--preset--color--ember); }

.wp-block-query-pagination {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .76rem;
	margin-top: 2.5rem;
}
.wp-block-query-pagination .page-numbers {
	padding: .5rem .8rem;
	border: 1px solid var(--wp--preset--color--rule);
	text-decoration: none;
	border-radius: 2px;
}
.wp-block-query-pagination .page-numbers.current {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--ink);
}

/* ============================================================
   14. Footer
   ============================================================ */

.tt-footer { border-top: 0; }

.tt-footer .wp-block-site-logo img {
	max-height: 52px;
	width: auto;
}

.tt-footer__heading {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .5);
	margin-bottom: 1rem;
}

.tt-footer a { color: var(--wp--preset--color--white); text-decoration: none; }
.tt-footer a:hover { color: var(--wp--preset--color--gold); }

.tt-footer__colophon {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .68rem;
	letter-spacing: .07em;
	color: rgba(255, 255, 255, .55);
}

/* ============================================================
   15. Reveal on scroll
   ============================================================ */

.tt-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .6s var(--wp--custom--ease, ease-out),
	            transform .6s var(--wp--custom--ease, ease-out);
}
.tt-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.tt-reveal { opacity: 1; transform: none; }
}

/* ============================================================
   16. Print
   ============================================================ */

@media print {
	.tt-header,
	.tt-footer,
	.wp-block-buttons,
	.tt-form { display: none !important; }

	body { background: #fff; font-size: 11pt; }
	.tt-ledger { display: block; }
	.tt-entry,
	.tt-card,
	.tt-faq__item { page-break-inside: avoid; }
	.tt-faq__a { display: block !important; }
	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #666;
	}
}
