/**
 * Caldera — data-driven collections.
 *
 * Press, listings, team, events and testimonials: the grids, the cards and the two
 * single views that reuse them. Everything here is flat — the only hierarchy comes
 * from the Pumice → Limestone step, the hairline border and the radius scale.
 */

/* =========================================================== Shared shell */

.caldera-collection {
	margin-bottom: var(--spacing-48);
}

/*
 * The shared filter script toggles the `hidden` property, and the server renders
 * the same attribute for the no-JS path. Card and grid display rules are more
 * specific than the UA default, so hiding has to be restated here.
 */
.caldera-collection [hidden],
.caldera-collection[hidden] {
	display: none !important;
}

.caldera-collection__intro {
	margin-bottom: var(--spacing-40);
}

.caldera-collection__note {
	margin: var(--spacing-24) 0 0;
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.caldera-collection__back {
	margin-top: var(--spacing-48);
}

.caldera-collection__item {
	display: flex;
	flex-direction: column;
}

.caldera-collection__item > .caldera-card {
	flex: 1 1 auto;
}

/* The header/footer social list is hidden below 640px; inside a collection card
   it is primary content, so it stays. */
.caldera-social--collection {
	display: flex;
	flex-wrap: wrap;
}

/* =========================================================== Press */

.caldera-press-group + .caldera-press-group {
	margin-top: var(--spacing-64);
}

.caldera-press-group__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--spacing-16);
	margin-bottom: var(--spacing-24);
	padding-bottom: var(--spacing-16);
	border-bottom: var(--border-hairline) dotted var(--border-color);
}

.caldera-press-group__title {
	margin: 0;
	font-size: var(--text-heading);
	line-height: var(--leading-heading);
}

.caldera-press-group__flag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 30px;
	border: var(--border-hairline) solid var(--border-color);
	border-radius: var(--radius-small);
	background: var(--surface-raised);
	object-fit: cover;
	overflow: hidden;
}

.caldera-press-group__flag--text {
	font-family: var(--font-body);
	font-size: var(--text-body-sm);
	font-weight: var(--font-weight-medium);
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.caldera-press-group__count {
	margin-left: auto;
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.caldera-press-group__note {
	margin: var(--spacing-16) 0 0;
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	color: var(--text-muted);
}

.caldera-press-card__media {
	aspect-ratio: 3 / 2;
	background: var(--surface-canvas);
	border-radius: 0;
}

/* Press images are publication logos and screenshots of wildly different shapes,
   so they are fitted rather than cropped. */
.caldera-press-card__media img {
	object-fit: contain;
	padding: var(--spacing-24);
}

.caldera-press-card__title {
	font-size: var(--text-subheading);
	line-height: var(--leading-subheading);
}

.caldera-press-card__out {
	width: 0.7em;
	height: 0.7em;
	margin-left: var(--spacing-4);
	vertical-align: baseline;
}

/* =========================================================== Listings */

.caldera-listing-card {
	gap: var(--spacing-20);
}

.caldera-listing-card--sponsored {
	border: var(--border-hairline) solid var(--color-obsidian);
}

.caldera-listing-card__head {
	display: flex;
	align-items: flex-start;
	gap: var(--spacing-16);
}

.caldera-listing-card__logo {
	flex: none;
	width: 64px;
	height: 64px;
	margin: 0;
	aspect-ratio: 1;
	border-radius: var(--radius-small);
}

.caldera-listing-card__identity {
	min-width: 0;
}

.caldera-listing-card__name {
	font-size: var(--text-subheading);
	line-height: var(--leading-subheading);
	overflow-wrap: anywhere;
}

.caldera-listing-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-8);
	align-items: center;
	margin: var(--spacing-8) 0 0;
}

.caldera-ticker {
	display: inline-flex;
	align-items: center;
	padding: var(--spacing-4) var(--spacing-10);
	border: var(--border-hairline) solid var(--border-color);
	border-radius: var(--radius-pills);
	font-family: var(--font-mono);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

/*
 * Sulfur is reserved for one badge per card, so category pills inside a listing
 * step back to an outline and let the sponsored flag carry the colour.
 */
.caldera-listing-card__tags .caldera-tag {
	border: var(--border-hairline) solid var(--border-color);
	background: transparent;
}

.caldera-listing-card__tags a.caldera-tag:hover,
.caldera-listing-card__tags a.caldera-tag:focus-visible {
	background: var(--color-obsidian);
	color: var(--color-chalk);
}

/* Only ever shown on a listing with nothing else to put in its body, so it takes
   the space the facts grid would have taken rather than sitting under a gap. */
.caldera-listing-card__summary {
	margin: 0;
	font-size: var(--text-body-sm);
	line-height: var(--leading-body-sm);
}

/* Present but unemphatic, like the events grid's "date to be announced". */
.caldera-listing-card__summary--pending {
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
	opacity: 0.6;
}

.caldera-listing-card__facts {
	display: grid;
	gap: var(--spacing-12);
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	margin: auto 0 0;
}

.caldera-listing-card__fact dt {
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.caldera-listing-card__fact dd {
	margin: var(--spacing-4) 0 0;
	font-size: var(--text-body-sm);
	line-height: var(--leading-body-sm);
	overflow-wrap: anywhere;
}

/* Funding progress -------------------------------------------------------- */

.caldera-progress {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-8);
}

.caldera-progress__track {
	height: 12px;
	border: var(--border-hairline) solid var(--border-color);
	border-radius: var(--radius-pills);
	background: var(--surface-raised);
	overflow: hidden;
}

.caldera-progress__bar {
	height: 100%;
	min-width: 2px;
	border-radius: var(--radius-pills);
	background: var(--color-ember);
}

.caldera-progress__value {
	margin: 0;
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.caldera-progress--wide {
	padding: var(--spacing-24) var(--card-padding);
	margin-bottom: var(--spacing-48);
	border-radius: var(--radius-cards);
	background: var(--surface-raised);
}

/* Single listing ---------------------------------------------------------- */

.caldera-listing-single__hero {
	margin-bottom: var(--spacing-40);
}

.caldera-listing-single__identity {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--spacing-24);
}

.caldera-listing-single__logo {
	flex: none;
	width: 96px;
	height: 96px;
	margin: 0;
	aspect-ratio: 1;
	border-radius: var(--radius-medium);
}

.caldera-listing-single__name {
	margin-bottom: var(--spacing-12);
}

.caldera-listing-single__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-8);
	align-items: center;
	margin: 0 0 var(--spacing-12);
}

.caldera-rating {
	display: inline-flex;
	align-items: center;
	padding: var(--spacing-4) var(--spacing-10);
	border-radius: var(--radius-pills);
	background: var(--surface-raised);
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.caldera-listing-single__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-12);
	margin-top: var(--spacing-24);
}

.caldera-listing-single__stats {
	margin-bottom: var(--spacing-48);
}

.caldera-listing-single__stats .caldera-stat__value {
	font-size: var(--text-heading);
	line-height: var(--leading-heading);
}

.caldera-listing-single__body {
	display: grid;
	gap: var(--spacing-48);
	align-items: start;
}

@media (min-width: 1024px) {
	.caldera-listing-single__body {
		grid-template-columns: minmax(0, 1fr) 360px;
	}
}

.caldera-listing-single__aside {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-24);
	padding: var(--card-padding);
	border-radius: var(--radius-cards);
	background: var(--surface-raised);
}

/* =========================================================== Spec table */

.caldera-spec {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.caldera-spec__caption {
	margin-bottom: var(--spacing-16);
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	color: var(--text-muted);
}

.caldera-spec__row + .caldera-spec__row .caldera-spec__label,
.caldera-spec__row + .caldera-spec__row .caldera-spec__value {
	border-top: var(--border-hairline) dotted var(--border-color);
}

.caldera-spec__label,
.caldera-spec__value {
	padding: var(--spacing-12) 0;
	font-size: var(--text-body-sm);
	line-height: var(--leading-body-sm);
	vertical-align: top;
}

.caldera-spec__label {
	width: 45%;
	font-weight: var(--font-weight-medium);
	color: var(--text-muted);
}

.caldera-spec__value {
	padding-left: var(--spacing-16);
	overflow-wrap: anywhere;
}

/* =========================================================== Team */

.caldera-member-card__photo {
	aspect-ratio: 1;
	margin: 0;
	border-radius: 0;
}

.caldera-member-card__name {
	font-size: var(--text-subheading);
	line-height: var(--leading-subheading);
}

.caldera-member-card__role {
	margin: 0;
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.caldera-member-single__layout {
	display: grid;
	gap: var(--spacing-40);
	align-items: start;
}

@media (min-width: 900px) {
	.caldera-member-single__layout {
		grid-template-columns: 320px minmax(0, 1fr);
		gap: var(--spacing-64);
	}
}

.caldera-member-single__photo {
	aspect-ratio: 1;
	margin: 0;
	border-radius: var(--radius-cards);
}

.caldera-member-single__role {
	margin: 0;
	font-family: var(--font-meta);
	font-size: var(--text-body-sm);
	line-height: var(--leading-body-sm);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.caldera-member-single__bio {
	margin-block: var(--spacing-24);
}

.caldera-member-single__contact {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-16);
	padding: 0;
	margin: 0 0 var(--spacing-24);
	list-style: none;
	font-size: var(--text-body-sm);
}

.caldera-member-single__contact a {
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-8);
	padding: var(--spacing-8) var(--spacing-16);
	border: var(--border-hairline) solid var(--border-color);
	border-radius: var(--radius-pills);
	text-decoration: none;
}

.caldera-member-single__contact a:hover,
.caldera-member-single__contact a:focus-visible {
	background: var(--color-obsidian);
	color: var(--color-chalk);
}

/* =========================================================== Events */

.caldera-events__section:first-of-type {
	margin-top: var(--spacing-48);
}

/*
 * The events page is one list divided into three named groups, not three
 * chapters. At the document heading scale each divider ran to 80px over a group
 * that is often a single card, so the labels dwarfed the events. They keep a
 * heading rank, one step down, and the air around them shrinks to match.
 */
.caldera-events__section {
	margin-block: var(--spacing-48);
}

.caldera-events__section .caldera-section__head {
	margin-bottom: var(--spacing-24);
}

.caldera-events__section .caldera-section__title {
	font-size: var(--text-heading);
	line-height: var(--leading-heading);
}

/*
 * Cards in a collection stop stretching to the tallest in their row.
 *
 * Directory records carry genuinely optional fields — a role, a location, a
 * token price, a funding bar — so an equal-height row turned every missing field
 * into blank card. It was worst on listings, where the facts block is anchored
 * to the card foot: a sparse card became a name, a void, and a date. Cards now
 * size to their content, and the anchor only does anything when there is real
 * height to push against.
 *
 * The presale and campaign grids deliberately keep equal heights: their cards
 * are uniformly dense and the anchored action row is worth aligning.
 */
.caldera-collection,
.caldera-events__section .caldera-grid,
.caldera-press-group .caldera-grid {
	align-items: start;
}

.caldera-event-card__media {
	aspect-ratio: 16 / 9;
	margin: 0;
	border-radius: 0;
}

.caldera-event-card__date,
.caldera-event-card__location {
	display: flex;
	align-items: center;
	gap: var(--spacing-8);
	margin: 0;
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.caldera-event-card__date svg,
.caldera-event-card__location svg {
	flex: none;
}

/* Present but unemphatic: it holds the line so titles stay aligned across a row
   without claiming the same weight as a real date. */
.caldera-event-card__date--tba {
	opacity: 0.6;
}

.caldera-event-card__title {
	font-size: var(--text-subheading);
	line-height: var(--leading-subheading);
}

.caldera-event-single__facts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-24);
	padding: 0;
	margin: var(--spacing-24) 0 0;
	list-style: none;
	font-size: var(--text-body-sm);
}

.caldera-event-single__facts li {
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-8);
}

/* =========================================================== Testimonials */

.caldera-testimonial-card {
	gap: var(--spacing-24);
	justify-content: space-between;
}

.caldera-testimonial-card__quote {
	padding: 0;
	margin: 0;
	border: 0;
}

.caldera-testimonial-card__quote p {
	margin: 0;
	font-size: var(--text-body);
	line-height: var(--leading-body);
}

/* The opening mark is decorative punctuation, not content. */
.caldera-testimonial-card__quote p::before {
	content: '“';
	margin-right: var(--spacing-4);
	color: var(--color-ember);
}

.caldera-testimonial-card__source {
	display: flex;
	align-items: center;
	gap: var(--spacing-16);
}

.caldera-testimonial-card__avatar {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: var(--radius-pills);
	object-fit: cover;
}

.caldera-testimonial-card__name {
	margin: 0;
	font-size: var(--text-subheading);
	line-height: var(--leading-subheading);
}
