/*
 * Home page sections, in page order.
 *
 * The Home page is made of core blocks. Each section is a Group block whose
 * "Additional CSS class" matches a class below. Keep those classes when
 * editing and the layout looks after itself.
 */

/* ---------- Hero ---------- */

/*
 * Blocks: a "te-hero" group holding
 *   - a "te-hero__media" group of image blocks (the photos that fade in turn)
 *   - a "lozenge" paragraph (the announcement)
 *   - the H1
 *   - a "te-hero__row" group with the intro paragraph and the buttons.
 */
.te-hero {
	--hero-h: 760px;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: var(--hero-h);
	padding: 112px var(--te-gutter) 32px;
	overflow: hidden;
	background: var(--te-charcoal);
	color: var(--te-on-dark);
}

.te-hero > * {
	position: relative;
	z-index: 2;
}

.te-hero > .te-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.te-hero__media figure {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1.2s ease;
}

/* Until the script takes over, and whenever it can't run, the first photo shows. */
.te-hero__media:not(.is-ready) figure:first-child,
.te-hero__media figure.is-on {
	opacity: 1;
}

.te-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Darkens the photos so the text stays readable. */
.te-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgb(33 33 33 / 0.7) 0%, rgb(33 33 33 / 0.4) 32%, rgb(33 33 33 / 0.82) 68%, rgb(33 33 33 / 0.95) 100%);
}

.te-hero .lozenge {
	align-self: flex-start;
	margin-bottom: auto;
}

.te-hero__title {
	max-width: 1100px;
	margin-top: 48px;
	font-size: clamp(48px, 6.4vw, 96px);
	line-height: 0.95;
}

.te-hero__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px 40px;
	margin-top: 32px;
}

.te-hero__intro {
	flex: 1 1 420px;
	max-width: 580px;
	color: var(--te-on-dark-2);
	font-size: 19px;
	line-height: 29px;
}

.te-hero > .hero-ctl {
	position: absolute;
	top: 113px;
	right: var(--te-gutter);
	z-index: 3;
	background: rgb(33 33 33 / 0.35);
	color: var(--te-on-dark);
}

.hero-ctl:hover {
	background: rgb(33 33 33 / 0.6);
}

.admin-bar .te-hero {
	padding-top: 144px;
}

.admin-bar .te-hero > .hero-ctl {
	top: 145px;
}

/* ---------- Numbers and quotes ---------- */

/*
 * Blocks: a "te-stats" group of four "v-stat" groups, each with a number
 * paragraph ("v-stat__num") and a label paragraph ("v-stat__label"). Then a
 * "te-quotes" group of Quote blocks, which the script turns into a slider.
 */
.te-numbers {
	padding-bottom: 32px;
	background: var(--te-warm-grey);
}

.te-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
	gap: 24px;
	margin-top: 32px;
}

.v-stat__num {
	color: var(--te-meteorite);
	font-family: var(--hf);
	font-weight: var(--hw);
	letter-spacing: var(--ht);
	font-size: clamp(48px, 5vw, 72px);
	line-height: 0.95;
	font-variant-numeric: tabular-nums;
}

.v-stat__label {
	margin-top: 10px;
	color: var(--te-text-3);
}

.te-quotes {
	margin-top: 16px;
	padding: 40px 44px 28px;
	border-radius: var(--r-l);
	background: var(--te-white);
}

.q-stage {
	display: grid;
}

.te-quotes blockquote {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
	gap: 24px 56px;
	align-items: end;
	margin: 0;
	padding: 0;
	border: 0;
}

.te-quotes blockquote p {
	font-family: var(--hf);
	font-weight: var(--hw);
	letter-spacing: var(--ht);
	text-wrap: balance;
	font-size: clamp(26px, 2.3vw, 34px);
	line-height: 1.22;
}

.te-quotes blockquote cite {
	color: var(--te-text-2);
	font-size: 16px;
	font-style: normal;
	line-height: 22px;
}

.te-quotes blockquote cite strong {
	color: var(--te-meteorite);
	font-weight: 600;
}

/* One quote under the next, until the script builds the slider (and for good without JavaScript). */
.te-quotes blockquote + blockquote {
	margin-top: 32px;
	padding-top: 32px;
	border-top: 1px solid var(--te-warm-grey);
}

/* With JavaScript, hold back all but the first so the page doesn't jump while the slider is built. */
.js .te-quotes:not(.is-ready) blockquote + blockquote {
	display: none;
}

.q-slide {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.te-quotes .q-slide + .q-slide {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.q-slide.is-on {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.45s ease;
}

.q-ctl {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 28px;
	padding-top: 16px;
	border-top: 1px solid var(--te-warm-grey);
}

.q-dots {
	display: flex;
	margin-left: -14px;
}

.q-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.q-dot span {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--te-stone);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.q-dot:hover span {
	background: var(--te-meteorite);
}

.q-dot[aria-current="true"] span {
	background: var(--te-orange);
	transform: scale(1.3);
}

.q-arrows {
	display: flex;
	align-items: center;
	gap: 10px;
}

.q-count {
	margin-right: 6px;
	color: var(--te-text-3);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.q-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1.5px solid var(--te-meteorite);
	border-radius: 1000px;
	background: transparent;
	color: var(--te-meteorite);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.q-arrow:hover {
	background: var(--te-meteorite);
	color: var(--te-on-dark);
}

/* ---------- Patrons ---------- */

.te-patrons {
	padding-top: 0;
	background: var(--te-warm-grey);
}

.te-logos {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- Orrery ---------- */

.te-orrery {
	--orr-bg: var(--te-meteorite);
	--orr-fg: var(--te-on-dark);
	--orr-small: var(--te-on-dark-muted);
	--orr-muted: var(--te-on-dark-3);
	--orr-rule: rgb(253 252 244 / 0.18);
	--orr-num: var(--te-orange-on-dark);
	--orr-tick: rgb(253 252 244 / 0.28);
	--orr-ring: rgb(253 252 244 / 0.18);
	--orr-b1: var(--te-on-dark);
	--orr-b2: var(--te-on-dark-muted);
	--orr-label: var(--te-on-dark-3);
	background: var(--orr-bg);
	color: var(--orr-fg);
}

.orr-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: 24px 40px;
	align-items: center;
	padding: 40px 40px 40px 56px;
}

.te-orrery .te-small-heading {
	color: var(--orr-small);
}

.te-orrery__text {
	max-width: 500px;
	margin-top: 20px;
	color: var(--orr-muted);
	font-size: 17px;
	line-height: 26px;
}

.te-orrery__points {
	max-width: 500px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: point;
	color: var(--orr-muted);
}

.te-orrery__points li {
	position: relative;
	padding: 14px 0 14px 36px;
	border-top: 1px solid var(--orr-rule);
	counter-increment: point;
}

.te-orrery__points li:last-child {
	border-bottom: 1px solid var(--orr-rule);
}

/* 01, 02, 03 */
.te-orrery__points li::before {
	content: counter(point, decimal-leading-zero);
	position: absolute;
	left: 0;
	color: var(--orr-num);
	font-weight: 600;
}

.te-orrery__points strong {
	color: var(--orr-fg);
	font-weight: 600;
}

.te-orrery__copy {
	min-width: 0;
}

.te-orrery__stage {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.te-orrery__stage > svg {
	display: block;
	width: 100%;
	max-width: 860px;
	height: auto;
	margin: -16px;
}

.orr-ticks {
	stroke: var(--orr-tick);
}

.orr-ring {
	fill: none;
	stroke: var(--orr-ring);
	stroke-width: 1;
}

.orr-bead {
	fill: var(--orr-b1);
	stroke: var(--orr-bg);
	stroke-width: 2;
}

.orr-spin--alt .orr-bead {
	fill: var(--orr-b2);
}

.orr-hub {
	fill: var(--orr-bg);
	stroke: var(--te-orange);
	stroke-width: 1.5;
}

.orr-mark {
	transform-origin: 380px 380px;
	transition: transform 0.35s cubic-bezier(0.3, 1.3, 0.5, 1);
}

.orr-labels {
	fill: var(--orr-label);
	font-family: var(--te-font);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.08em;
}

/* Rings turn at their own speed. */
.orr-spin {
	transform-origin: 380px 380px;
	animation: orr-spin linear infinite;
}

@keyframes orr-spin {
	to {
		transform: rotate(360deg);
	}
}

/* A connection line flashes when two members line up. */
.orr-flash {
	stroke: #FF6A3D;
	stroke-width: 4;
	stroke-linecap: round;
	filter: drop-shadow(0 0 6px rgb(255 86 35 / 0.7));
	opacity: 0;
	animation: orr-flash var(--orr-loop) linear infinite;
}

@keyframes orr-flash {
	0%,
	2% {
		opacity: 1;
	}

	5%,
	100% {
		opacity: 0;
	}
}

/* The two members glow orange at the same moment. */
.orr-lit {
	fill: var(--te-orange);
	stroke: var(--orr-bg);
	stroke-width: 2;
	opacity: 0;
	animation: orr-lit var(--orr-loop) linear infinite;
}

@keyframes orr-lit {
	0%,
	2% {
		opacity: 1;
	}

	3.5%,
	100% {
		opacity: 0;
	}
}

.is-paused .orr-spin,
.is-paused .orr-flash,
.is-paused .orr-lit {
	animation-play-state: paused !important;
}

.orr-ctl {
	right: 0;
	bottom: 8px;
	background: transparent;
	color: var(--orr-muted);
}

.orr-ctl:hover {
	background: var(--orr-rule);
}

/* ---------- Where to start ---------- */

.te-start {
	background: var(--te-warm-white);
}

.te-start__title {
	max-width: 900px;
	margin-bottom: 40px;
}

/* ---------- Events ---------- */

.te-events {
	background: var(--te-warm-grey);
}

/* Heading on the left, filter on the right, sitting on the same baseline. */
.te-events__head {
	margin-top: 18px;
}

.te-events__head .te-h2 {
	margin: 0;
}

.te-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.te-eventlist {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.te-event {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) auto;
	gap: 8px 24px;
	align-items: center;
	padding: 10px 24px 10px 10px;
	border-radius: var(--r-s);
	background: var(--te-white);
}

.te-event.is-ours .ev-date {
	background: var(--te-peach);
}

.te-event__title {
	margin: 0;
	font-size: 21px;
	line-height: 26px;
}

.te-event__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 4px 0 0;
	color: var(--te-text-3);
}

.te-events__empty {
	margin: 16px 0 0;
	color: var(--te-text-2);
}

/* ---------- Tech East 100 ---------- */

.te-te100 {
	background: var(--te-warm-white);
}

.te-band {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 380px;
	overflow: hidden;
	background: var(--te-meteorite);
	color: var(--te-on-dark);
}

/* The photo is an image block with the class "te-band__img". */
.te-band__img {
	position: absolute;
	inset: 0;
}

.te-band__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.te-band::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgb(33 33 33 / 0.25) 0%, rgb(33 33 33 / 0.55) 45%, rgb(33 33 33 / 0.88) 100%);
}

.te-band__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px 24px;
	width: 100%;
	padding: 64px var(--te-gutter) 48px;
}

.te-band .te-small-heading {
	color: var(--te-on-dark-2);
}

.te-band__title {
	margin-top: 18px;
	font-size: clamp(48px, 6vw, 88px);
	line-height: 0.92;
}

.te-te100__list {
	padding-top: 40px;
}

/* ---------- Latest news ---------- */

.te-news {
	background: var(--te-warm-grey);
}

/* ---------- About ---------- */

.te-about {
	background: var(--te-warm-white);
}

.te-about__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 32px 64px;
	align-items: end;
}

.te-about__statement {
	margin: 18px 0 28px;
	text-wrap: balance;
	font-size: clamp(28px, 2.8vw, 40px);
	line-height: 1.1;
}

.te-about__team {
	display: flex;
	align-items: center;
	gap: 18px;
}

.te-about__team p {
	color: var(--te-text-2);
}

.te-about__team a {
	color: var(--te-meteorite);
}

.te-faces {
	display: flex;
	flex: 0 0 auto;
}

/* Each face is an image block with the class "te-face". */
.te-face img {
	display: block;
	width: 64px;
	height: 64px;
	border: 3px solid var(--te-warm-white);
	border-radius: 1000px;
	background: var(--te-warm-grey);
	object-fit: cover;
	object-position: 50% 30%;
}

.te-face + .te-face {
	margin-left: -16px;
}

/* ---------- Take the Tour ---------- */

.tour-dock {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 50;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.tour-panel {
	width: min(380px, calc(100vw - 40px));
	overflow: hidden;
	border-radius: 10px;
	background: var(--te-warm-white);
	box-shadow: rgba(172, 171, 171, 0.3) 0 -1px 10px 0, 0 16px 32px -12px rgba(42, 44, 47, 0.35);
	color: var(--te-meteorite);
}

.tour-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 10px 10px 20px;
	border-bottom: 1px solid var(--te-rule);
}

.tour-close {
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	color: var(--te-meteorite);
	font-size: 18px;
	cursor: pointer;
}

.tour-body {
	max-height: min(420px, calc(100vh - 260px));
	overflow-y: auto;
	padding: 4px 20px;
}

.tour-body ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tour-body li {
	border-bottom: 1px solid var(--te-warm-grey);
}

.tour-step {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px 0;
	border: 0;
	background: transparent;
	color: var(--te-meteorite);
	text-align: left;
	cursor: pointer;
}

.tour-dot {
	flex: 0 0 8px;
	height: 8px;
	border-radius: 1000px;
	background: var(--te-on-dark-muted);
}

.tour-label {
	flex: 1 1 auto;
}

.tour-icon {
	color: var(--te-text-3);
}

.tour-icon::before {
	content: "+";
}

.tour-step[aria-expanded="true"] .tour-dot {
	background: var(--te-orange);
}

.tour-step[aria-expanded="true"] .tour-label {
	font-weight: 600;
}

.tour-step[aria-expanded="true"] .tour-icon::before {
	content: "–";
}

.tour-detail {
	padding: 0 0 16px 20px;
}

.tour-detail .v-h {
	margin: 0;
	font-size: 19px;
	line-height: 23px;
}

.tour-detail p + p {
	margin: 6px 0 0;
	color: var(--te-text-2);
	font-size: 14px;
	line-height: 21px;
}

.tour-choices {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 8px;
}

.tour-choices a {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
}

.tour-link {
	display: inline-block;
	margin-top: 8px;
}

.tour-foot {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 20px 16px;
	border-top: 1px solid var(--te-rule);
}

.tour-foot [aria-disabled="true"] {
	opacity: 0.4;
	cursor: default;
}

.tour-fab {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 20px 0 16px;
	border: 0;
	border-radius: 8px;
	background: var(--te-meteorite);
	box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
	color: var(--te-on-dark);
	font-size: 15px;
	white-space: nowrap;
	cursor: pointer;
}

.tour-fabdot {
	width: 8px;
	height: 8px;
	border-radius: 1000px;
	background: var(--te-orange);
}

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
	.orr-grid {
		grid-template-columns: minmax(0, 1fr);
		padding: 40px 24px;
	}
}

@media (max-width: 720px) {
	.te-event {
		grid-template-columns: 56px minmax(0, 1fr);
		column-gap: 16px;
	}

	.te-event > .v-btn {
		grid-column: 2;
		justify-self: start;
	}
}

@media (max-width: 600px) {
	.te-hero {
		--hero-h: 620px;
	}

	.te-hero {
		padding: 96px 20px 20px;
	}

	.admin-bar .te-hero {
		padding-top: 142px;
	}

	.te-hero > .hero-ctl,
	.admin-bar .te-hero > .hero-ctl {
		top: auto;
		right: 20px;
		bottom: 20px;
	}

	.te-hero__title {
		margin-top: 32px;
	}

	.lozenge {
		flex-wrap: nowrap;
		padding: 5px 14px 5px 5px;
		font-size: 14px;
		white-space: nowrap;
	}

	.te-numbers {
		padding-bottom: 56px;
	}

	.te-patrons {
		padding-top: 56px;
	}

	.te-te100__list {
		padding-top: 56px;
	}

	.orr-grid {
		gap: 8px;
		padding: 40px 24px;
	}

	.te-events__head {
		display: block;
	}

	/* Without JavaScript, phones still get the shorter list. */
	html:not(.js) .te-event:nth-child(n+4) {
		display: none;
	}

	.te-events__head .te-chips,
	.te-site .te-events__head .wp-block-buttons {
		margin-top: 16px;
	}

	.te-stats {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
		margin-top: 20px;
	}

	.te-stats .v-stat {
		padding: 18px 16px;
	}

	.v-stat__num {
		font-size: 40px;
	}

	.v-stat__label {
		font-size: 14px;
		line-height: 19px;
	}

	.te-quotes {
		margin-top: 10px;
		padding: 24px;
	}

	.te-quotes blockquote {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.te-quotes blockquote p {
		font-size: 22px;
	}

	.te-quotes .q-ctl {
		margin-top: 20px;
	}

	.te-logos {
		grid-template-columns: 1fr 1fr 1fr;
		gap: 8px;
	}

	.te-logos .v-logo {
		height: 64px;
		padding: 10px 12px;
	}

	.te-logos .v-logo:has(a) {
		padding: 0;
	}

	.te-logos .v-logo a {
		padding: 10px 12px;
	}

	.te-logos .v-logo img {
		max-height: 34px;
	}

	.te-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-right: -20px;
		margin-left: -20px;
		padding: 0 20px 4px;
		scrollbar-width: none;
	}

	.te-chips > * {
		flex: 0 0 auto;
	}

	.te-event {
		padding: 12px 16px 14px 10px;
	}

	.te-band {
		min-height: 300px;
	}

	.te-band__body {
		padding: 40px 20px 28px;
	}

	.te-te100 .wp-block-button__link {
		white-space: normal;
	}

	.te-about__grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.te-hero__media figure,
	.q-slide,
	.q-slide.is-on,
	.q-dot span,
	.orr-mark {
		transition: none;
	}

	.orr-spin,
	.orr-flash,
	.orr-lit {
		animation: none !important;
	}

	/* Leave a few connections faintly drawn. */
	.orr-rm {
		opacity: 0.85;
	}
}
