/*
 * Components used across the site.
 * Source: "Styles 2 - components" on the Tech East design canvas.
 * Class names match the designs so templates port across unchanged.
 */

/* ---------- Pages built from core blocks ---------- */

/*
 * Page content sits in a "te-blocks" wrapper. base.css clears the default
 * block margins; the section styles set their own spacing.
 */
.te-blocks .alignfull {
	max-width: none;
	margin-right: 0;
	margin-left: 0;
}

.te-blocks .wp-block-image img {
	display: block;
}

/*
 * Photo focus. Add one of these as an "Additional CSS class" on an image
 * block to choose which part stays in view when the photo is cropped.
 */
.te-focus-top img {
	object-position: 50% 20%;
}

.te-focus-upper img {
	object-position: 50% 40%;
}

.te-focus-centre img {
	object-position: 50% 50%;
}

.te-focus-lower img {
	object-position: 50% 70%;
}

/* A text link with an arrow: add "te-link-arrow" to the paragraph. */
.te-link-arrow a {
	color: var(--te-meteorite);
	text-decoration: underline;
}

.te-link-arrow a::after,
.v-clink a::after,
.lozenge a::after {
	content: " →" / "";
}

/* ---------- Header ---------- */

.te-header {
	position: fixed;
	top: 12px;
	left: 16px;
	right: 16px;
	z-index: 40;
}

.admin-bar .te-header {
	top: 44px;
}

@media (max-width: 782px) {
	.admin-bar .te-header {
		top: 58px;
	}
}

.v-navbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	padding: 8px 10px 8px 20px;
	border: 1px solid rgb(253 252 244 / 0.7);
	border-radius: 8px;
	background: transparent;
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.v-navbar .v-nav {
	color: var(--te-on-dark);
}

.v-navbar .v-navlogo {
	fill: var(--te-on-dark);
	transition: fill 0.3s ease;
}

.v-navbar .v-navbtn {
	margin-left: 12px;
	min-height: 36px;
	padding: 4px 10px 4px 12px;
	gap: 10px;
	border-width: 1.5px;
	border-color: var(--te-on-dark);
	color: var(--te-on-dark);
	font-size: 14px;
}

.v-navbar .v-navbtn:hover {
	background: var(--te-on-dark);
	color: var(--te-meteorite);
}

/* Solid: once the page has scrolled past the top. */
.v-navbar.is-solid {
	background: rgb(253 252 244 / 0.9);
	border-color: rgb(42 44 47 / 0.08);
	box-shadow: rgba(42, 44, 47, 0.12) 0 2px 14px 0;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.v-navbar.is-solid .v-nav {
	color: var(--te-meteorite);
}

.v-navbar.is-solid .v-navlogo {
	fill: var(--te-meteorite);
}

.v-navbar.is-solid .v-navbtn {
	border-color: var(--te-meteorite);
	color: var(--te-meteorite);
}

.v-navbar.is-solid .v-navbtn:hover {
	background: var(--te-meteorite);
	color: var(--te-on-dark);
}

.v-mainnav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 4px;
}

.v-nav {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	color: var(--te-meteorite);
	font-size: 15px;
	text-decoration: none;
}

.v-nav:hover,
.v-nav[aria-current="page"] {
	text-decoration: underline;
}

/* The logo shrinks to the mark alone once the page scrolls. */
.logo-clip {
	display: flex;
	width: 116px;
	overflow: hidden;
	transition: width 0.35s ease;
}

.logo-clip .te-logo {
	flex: 0 0 auto;
	max-width: none;
}

.logo-clip.is-compact {
	width: 48px;
}

.logo-word {
	transition: fill 0.3s ease, opacity 0.25s ease;
}

.logo-clip.is-compact .logo-word {
	opacity: 0;
}

.v-menubtn {
	display: none;
	min-height: 44px;
	padding: 0 16px;
	border: 1.5px solid currentColor;
	border-radius: 50px;
	background: transparent;
	color: var(--te-on-dark);
	font-size: 14px;
	cursor: pointer;
}

.v-navbar.is-solid .v-menubtn,
.v-navbar.menu-open .v-menubtn {
	color: var(--te-meteorite);
}

@media (max-width: 1180px) {
	/* The menu button only appears when JavaScript is running. Without it the links simply wrap. */
	.js .v-menubtn {
		display: inline-flex;
		align-items: center;
	}

	.js .v-mainnav {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		padding: 8px 0 4px;
	}

	.js .v-mainnav.is-open {
		display: flex;
	}

	.js .v-mainnav .v-nav {
		color: var(--te-meteorite);
		border-top: 1px solid var(--te-warm-grey);
	}

	.js .v-mainnav .v-navbtn {
		margin: 10px 0 0;
		align-self: flex-start;
		border-color: var(--te-meteorite);
		color: var(--te-meteorite);
	}

	.v-navbar.menu-open {
		background: var(--te-warm-white);
	}

	.v-navbar.menu-open .v-navlogo {
		fill: var(--te-meteorite);
	}

	/* No JavaScript: a solid bar so wrapped links stay readable. */
	html:not(.js) .v-navbar {
		background: var(--te-warm-white);
		border-color: rgb(42 44 47 / 0.08);
	}

	html:not(.js) .v-navbar .v-nav,
	html:not(.js) .v-navbar .v-navbtn {
		color: var(--te-meteorite);
		border-color: var(--te-meteorite);
	}

	html:not(.js) .v-navbar .v-navlogo {
		fill: var(--te-meteorite);
	}
}

/* ---------- Buttons and links ---------- */

.v-btn {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	min-height: 44px;
	padding: 8px 18px;
	border: 2px solid var(--te-meteorite);
	border-radius: var(--btn-r);
	background: transparent;
	color: var(--te-meteorite);
	font: inherit;
	font-size: 15px;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

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

.v-btn-dark {
	background: var(--te-meteorite);
	color: var(--te-on-dark);
}

.v-btn-dark:hover {
	background: var(--te-text-2);
}

.v-btn-light {
	border-color: var(--te-on-dark);
	color: var(--te-on-dark);
}

.v-btn-light:hover {
	background: var(--te-on-dark);
	color: var(--te-meteorite);
}

.v-btn-white {
	background: var(--te-white);
	border-color: var(--te-white);
	color: var(--te-meteorite);
}

.v-btn-white:hover {
	background: var(--te-warm-grey);
	border-color: var(--te-warm-grey);
	color: var(--te-meteorite);
}

/*
 * The core Button block takes the same styles. Choose Dark, White or Outline
 * (on dark) under the block's Styles. The arrow is added for you: → for links
 * within the site, ↗ for links that open in a new tab. Add the class
 * "te-no-arrow" to the button to leave it off.
 */
.te-site .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.te-site .wp-block-buttons.te-btnrow--tight {
	gap: 8px;
}

.te-site .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	min-height: 44px;
	padding: 8px 18px;
	border: 2px solid var(--te-meteorite);
	border-radius: var(--btn-r);
	background: transparent;
	color: var(--te-meteorite);
	font: inherit;
	font-size: 15px;
	line-height: 24px;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.te-site .wp-block-button__link:hover {
	background: var(--te-meteorite);
	color: var(--te-on-dark);
}

.te-site .wp-block-button__link::after {
	content: "→" / "";
	display: inline-block;
	transition: transform 0.2s ease;
}

.te-site .wp-block-button__link:hover::after {
	transform: translateX(3px);
}

.te-site .wp-block-button__link[target="_blank"]::after {
	content: "↗" / " (opens in a new tab)";
	transform: none;
}

.te-site .te-no-arrow .wp-block-button__link::after {
	content: none;
}

.te-site .is-style-te-dark .wp-block-button__link {
	background: var(--te-meteorite);
	color: var(--te-on-dark);
}

.te-site .is-style-te-dark .wp-block-button__link:hover {
	background: var(--te-text-2);
	border-color: var(--te-text-2);
}

.te-site .is-style-te-light .wp-block-button__link {
	border-color: var(--te-on-dark);
	color: var(--te-on-dark);
}

.te-site .is-style-te-light .wp-block-button__link:hover {
	background: var(--te-on-dark);
	color: var(--te-meteorite);
}

.te-site .is-style-te-white .wp-block-button__link {
	background: var(--te-white);
	border-color: var(--te-white);
	color: var(--te-meteorite);
}

.te-site .is-style-te-white .wp-block-button__link:hover {
	background: var(--te-warm-grey);
	border-color: var(--te-warm-grey);
	color: var(--te-meteorite);
}

.v-arr {
	display: inline-block;
	transition: transform 0.2s ease;
}

.v-btn:hover .v-arr {
	transform: translateX(3px);
}

.v-tlink {
	color: var(--te-meteorite);
	text-decoration: underline;
}

/* The arrow after an external link, where the link is a flex row and would swallow the space. */
.v-ext {
	margin-left: 0.3em;
}

.v-chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--te-stone);
	border-radius: 1000px;
	background: transparent;
	color: var(--te-meteorite);
	font-size: 14px;
	cursor: pointer;
}

.v-chip[aria-pressed="true"] {
	background: var(--te-meteorite);
	border-color: var(--te-meteorite);
	color: var(--te-on-dark);
}

/* A selected "Tech East" filter is peach with a dark outline. */
.v-chip--te[aria-pressed="true"] {
	background: var(--te-peach);
	color: var(--te-meteorite);
}

/* Round pause and play control on anything that moves. */
.ctl-btn {
	position: absolute;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 1000px;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.ctl-btn:hover,
.ctl-btn:focus-visible {
	opacity: 1;
}

.ctl-btn .ico-play,
.ctl-btn.is-paused .ico-pause {
	display: none;
}

.ctl-btn.is-paused .ico-play {
	display: block;
}

/* Controls that need JavaScript stay hidden without it. */
html:not(.js) .ctl-btn {
	display: none;
}

/* ---------- Cards ---------- */

/*
 * Audience card. Blocks: a "v-card" group holding an image block ("v-cimg")
 * and a "v-cbody" group with a small heading paragraph, an H3 ("v-ctitle"), a
 * paragraph ("v-ctext") and a link paragraph ("v-clink"). The link covers the
 * whole card.
 */
.v-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--r-l);
	background: var(--te-white);
	color: var(--te-meteorite);
	text-decoration: none;
}

.v-clink a {
	color: inherit;
}

.v-clink a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.v-clink a:focus-visible {
	outline: none;
}

.v-card:has(.v-clink a:focus-visible) {
	outline: 2px solid var(--te-orange);
	outline-offset: 3px;
}

.v-cimg {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.v-cimg img,
.v-nimg img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s ease;
}

.v-card:hover .v-cimg img,
.v-news:hover .v-nimg img {
	transform: scale(1.04);
}

.v-cbody {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	padding: 24px calc(24px + var(--r-l) * 0.3) 32px;
}

.v-cbody .te-small-heading,
.v-news .te-small-heading {
	color: var(--te-text-3);
}

.v-ctitle {
	font-size: 24px;
	line-height: 28px;
}

.v-ctext {
	color: var(--te-text-2);
}

.v-clink {
	margin-top: auto;
	padding-top: 8px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.v-news {
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--te-meteorite);
	text-decoration: none;
}

.v-nimg {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--r-l);
}

.v-ntitle {
	font-size: 21px;
	line-height: 26px;
}

.v-news:hover .v-ntitle {
	text-decoration: underline;
}

/* Company card */
.te-co {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	min-height: 230px;
	padding: 26px;
	border-radius: var(--r-l);
	background: var(--te-white);
	box-shadow: inset 0 0 0 1px var(--te-rule-soft);
	color: var(--te-meteorite);
	text-decoration: none;
}

.te-co:hover .v-h {
	text-decoration: underline;
}

.te-co__name {
	font-size: 22px;
	line-height: 26px;
}

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

.te-co__meta {
	margin-top: auto;
	color: var(--te-text-3);
	font-size: 14px;
}

.te-mono {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 6px;
	border-radius: var(--r-s);
	background: var(--te-warm-grey);
	color: var(--te-meteorite);
	font-weight: 600;
	font-size: 19px;
	letter-spacing: 0.02em;
}

/* Stat card */
.v-stat {
	display: flex;
	flex-direction: column;
	padding: 28px 28px 26px;
	border-radius: var(--r-s);
	background: var(--te-white);
}


/* Logo tile */
.v-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 96px;
	margin: 0;
	padding: 18px 24px;
	border-radius: var(--r-s);
	background: var(--te-white);
}

.v-logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 52px;
	object-fit: contain;
}

/* A linked logo: the whole tile is the link. */
.v-logo:has(a) {
	padding: 0;
}

.v-logo a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 18px 24px;
	border-radius: inherit;
	transition: box-shadow 0.2s ease;
}

.v-logo a:hover {
	box-shadow: inset 0 0 0 2px var(--te-meteorite);
}

/* Announcement lozenge */
.lozenge {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0;
	padding: 6px 16px 6px 6px;
	border-radius: 24px;
	background: var(--te-white);
	box-shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.6);
	color: var(--te-meteorite);
	font-size: 15px;
	line-height: 20px;
}

/* The tag: bold text at the start of the lozenge paragraph. */
.lozenge-new,
.lozenge strong {
	padding: 3px 12px;
	border-radius: 50px;
	background: var(--te-peach);
	font-weight: 600;
}

.lozenge a {
	color: var(--te-meteorite);
	font-weight: 600;
	text-decoration: underline;
}

/* Event date tile and tags */
.ev-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 7px 0 6px;
	border-radius: var(--r-s);
	color: var(--te-meteorite);
	text-align: center;
}

.ev-day {
	font-family: var(--hf);
	font-weight: var(--hw);
	font-size: 44px;
	line-height: 1;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.ev-mon {
	margin-top: 6px;
	color: var(--te-text-3);
	font-size: 14px;
	line-height: 16px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.ev-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 10px;
	border-radius: 1000px;
	background: var(--te-warm-grey);
	color: var(--te-meteorite);
	font-size: 13px;
}

.ev-tag-te {
	background: var(--te-peach);
}

.te-mark {
	display: inline-block;
	flex: 0 0 auto;
	width: 11px;
	height: 9px;
}

@media (max-width: 720px) {
	.ev-day {
		font-size: 38px;
	}

	.ev-mon {
		font-size: 13px;
	}
}

/* ---------- Plain title band ---------- */

.te-titleband {
	background: var(--te-meteorite);
	color: var(--te-on-dark);
}

.te-titleband__inner {
	padding: 148px var(--te-gutter) 56px;
}

.te-titleband .te-small-heading {
	margin-bottom: 18px;
	color: var(--te-on-dark-2);
}

.te-titleband .te-h1 {
	max-width: 900px;
}

.te-titleband__intro {
	max-width: 640px;
	margin: 24px 0 0;
	color: var(--te-on-dark-2);
	font-size: 19px;
	line-height: 29px;
}

/* ---------- Community block ---------- */

.te-community {
	background: var(--te-peach);
	color: var(--te-meteorite);
}

.te-community__inner {
	max-width: 1100px;
}

.te-community .te-small-heading {
	color: var(--te-text-2);
}

/* With no small heading above it, the large line starts the band. */
.te-community__inner > .te-h2:first-child {
	margin-top: 0;
}

.te-community__form {
	margin-top: 36px;
}

.te-joinform {
	display: flex;
}

.te-joinform .m-input {
	flex: 1 1 320px;
	min-width: 0;
	min-height: 80px;
	padding: 0 24px;
	border: 0;
	border-left: 1px solid var(--te-rule);
	border-radius: 0;
	background: var(--te-white);
	color: var(--te-meteorite);
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
}

/* The company field comes first, so it carries the rounded left end. */
.te-joinform .m-input--co {
	flex-basis: 260px;
	border-left: 0;
	border-radius: 8px 0 0 8px;
}

/* It is a search field only to keep browser contact suggestions away. */
.te-joinform .m-input--co::-webkit-search-cancel-button,
.te-joinform .m-input--co::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.te-joinform .m-input:focus-visible {
	position: relative;
	z-index: 1;
	outline-offset: -4px;
}

.te-joinform .m-input::placeholder {
	color: var(--te-text-3);
	opacity: 1;
}

.te-joinform .m-submit {
	flex: 0 0 auto;
	min-height: 80px;
	white-space: nowrap;
	padding: 0 32px;
	border: 0;
	border-radius: 0 8px 8px 0;
	background: var(--te-meteorite);
	color: var(--te-on-dark);
	font-weight: 600;
	cursor: pointer;
}

.te-joinform .m-submit:hover {
	background: var(--te-text-2);
}

.te-community .te-btnrow {
	margin-top: 24px;
}

.te-community__note {
	margin: 28px 0 0;
	color: var(--te-text-2);
	font-size: 15px;
}

@media (max-width: 600px) {
	.te-joinform {
		flex-direction: column;
		gap: 10px;
	}

	.te-community__form {
		margin-top: 28px;
	}

	.te-joinform .m-input,
	.te-joinform .m-submit {
		flex: 0 0 auto;
		width: 100%;
		min-height: 56px;
		border-radius: 10px;
	}

	.te-joinform .m-input,
	.te-joinform .m-input--co {
		padding: 0 18px;
		border: 1px solid #E8B892;
		border-radius: 10px;
	}

	.te-community .v-btn {
		white-space: normal;
	}
}

/* ---------- Footer ---------- */

.te-footer {
	background: var(--te-warm-grey);
	color: var(--te-meteorite);
}

.te-footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
	gap: 32px;
	padding: 64px var(--te-gutter) 0;
}

.te-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 14px;
	color: var(--te-text-2);
}

.te-footer__brand .te-logo {
	flex: 0 0 auto;
}

.te-footer__col {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.te-footer__col .te-small-heading {
	color: var(--te-text-3);
}

.v-foot {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	color: var(--te-meteorite);
	text-decoration: none;
}

.v-foot:hover {
	text-decoration: underline;
}

.te-footer__bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	margin-top: 56px;
	padding: 20px var(--te-gutter) 28px;
	border-top: 1px solid rgb(42 44 47 / 0.15);
	color: var(--te-text-3);
	font-size: 14px;
}

@media (max-width: 600px) {
	.te-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: 28px 16px;
		padding-top: 48px;
	}

	.te-footer__grid > :first-child {
		grid-column: 1 / -1;
	}

	.te-footer__grid > :last-child {
		grid-column: 1 / -1;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 4px 20px;
	}

	.te-footer__grid > :last-child .te-small-heading {
		width: 100%;
	}

	.te-footer__bar {
		margin-top: 40px;
		padding-top: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.logo-clip,
	.logo-word,
	.v-cimg img,
	.v-nimg img,
	.v-arr,
	.v-navbar,
	.v-btn {
		transition: none !important;
	}
}

/* A company's logo in place of its initials. */
.te-mono--logo {
	overflow: hidden;
	padding: 6px;
	background: var(--te-white);
	box-shadow: inset 0 0 0 1px var(--te-rule-soft);
}

.te-mono--logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* An event's title links to its own page. */
.te-event__title a {
	color: inherit;
	text-decoration: none;
}

.te-event__title a:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
