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

body,
h1,
h2,
h3,
p,
ol,
ul {
	margin: 0;
	padding: 0;
}

ol,
ul {
	list-style: none;
}

img {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

/* A column whose content grows, so a short page still puts the footer at the bottom of the screen. */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: var(--page-bg);
	color: var(--ink-body);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.57;
	letter-spacing: 0.02em;
	-webkit-font-smoothing: antialiased;
}

/* Header */

.site-footer,
.event-content {
	width: min(var(--page-width), 100% - 32px);
	margin-inline: auto;
}

/* Full-bleed so the blur and the edge span the screen; the padding keeps content on the page column.
   Content blurring through, and an edge that appears once scrolled, show the page continues above. */
.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px max(16px, (100% - var(--page-width)) / 2);
	border-bottom: 1px solid transparent;
	background: color-mix(in srgb, var(--page-bg) 80%, transparent);
	backdrop-filter: blur(12px) saturate(1.5);
	animation: header-edge linear both;
	animation-timeline: scroll();
	animation-range: 0 24px;
}

@keyframes header-edge {
	to {
		border-bottom-color: var(--border);
	}
}

.site-brand img {
	width: auto;
	height: 24px;
}

/* The bundled wordmark is used as a shape only, painted in the ink colour each theme pairs with its background. */
.default-logo {
	display: block;
	height: 24px;
	aspect-ratio: 313 / 244;
	background-color: var(--ink);
	mask: url("/assets/buzz/images/buzz-logo-no-bg.svg") center / contain no-repeat;
}

.mode-toggle {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--ink-strong);
	cursor: pointer;
}

.icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

:root[data-mode="dark"] .icon-moon,
:root[data-mode="light"] .icon-sun {
	display: none;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 12px;
}

.site-nav details {
	position: relative;
}

.site-nav summary {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	list-style: none;
	color: var(--ink-strong);
	font-size: 14px;
	font-weight: 500;
}

.site-nav summary::-webkit-details-marker {
	display: none;
}

.menu {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	z-index: 10;
	display: flex;
	flex-direction: column;
	min-width: 180px;
	padding: 4px;
	background: var(--surface-raised);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.menu a,
.menu button,
.menu-heading {
	padding: 6px 10px;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--ink-strong);
	font: inherit;
	font-size: 13px;
	text-align: left;
}

.menu [aria-current] {
	background: var(--border);
}

.menu a,
.menu button {
	cursor: pointer;
}

.menu-heading {
	color: var(--ink-muted);
}

.user-avatar {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--surface-raised);
	color: var(--ink-strong);
	object-fit: cover;
}

.login-frame {
	position: fixed;
	inset: 0;
	z-index: 100;
	width: 100%;
	height: 100%;
	border: 0;
	background: transparent;
	opacity: 0;
	pointer-events: none;
	transition: opacity 150ms ease-out;
}

.login-frame[data-ready] {
	opacity: 1;
	pointer-events: auto;
}

body:has(.login-frame:not([data-ready])) {
	cursor: progress;
}

/* Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
}

.btn-primary {
	background: var(--accent);
	color: var(--accent-ink);
}

.btn-secondary {
	border: 1px solid var(--border);
	color: var(--ink-strong);
}

.btn[aria-disabled="true"] {
	color: var(--ink-muted);
	cursor: not-allowed;
}

/* Hero */

.event-content {
	flex: 1;
	margin-block: 16px 64px;
}

.event-banner {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 1;
	background-color: var(--surface);
	object-fit: cover;
	border-radius: var(--radius-banner);
}

.event-intro {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 24px;
}

.event-heading {
	flex: 1;
	min-width: 0;
}

/* Self-hosted and preloaded by the layout, so titles never paint in the fallback face first.
   `block` keeps the title invisible for the few ms the preload may still be in flight.
   Latin subset only (10KB): characters outside it render in the fallback face. */
@font-face {
	font-family: "League Gothic";
	font-display: block;
	src: url("/assets/buzz/fonts/LeagueGothic-Latin.woff2") format("woff2");
}

/* The title face, shared by the date badge so both always match. */
:root {
	--font-title: "League Gothic", var(--font-display);
}

.event-title {
	color: var(--ink-title);
	font-family: var(--font-title);
	font-size: 40px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.017em;
}

/* Mobile only: on wider screens the sidebar's WHEN and WHERE blocks carry these. */
.event-meta {
	display: none;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
	color: var(--ink-muted);
	font-weight: 500;
}

.listing-description {
	margin-top: 8px;
	color: var(--ink-muted);
}

.meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.event-actions {
	flex-shrink: 0;
}

/* Columns */

.event-columns {
	display: grid;
	grid-template-columns: minmax(0, var(--measure)) var(--aside);
	justify-content: space-between;
	gap: 40px;
	margin-top: 40px;
}

.section + .section {
	margin-top: 40px;
}

.section-title {
	margin-bottom: 16px;
	color: var(--ink);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.15;
}

.label {
	margin: 20px 0 8px;
	color: var(--ink-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.prose > * + * {
	margin-top: 12px;
}

.prose a {
	color: var(--ink-strong);
	text-decoration: underline;
}

.prose ul,
.prose ol {
	padding-left: 20px;
}

.prose ul {
	list-style: disc;
}

.prose ol {
	list-style: decimal;
}

/* Kept under the 20px section title so a description never outranks its own heading. */
.prose :is(h1, h2, h3, h4, h5, h6) {
	margin: 0;
	color: var(--ink);
	font-size: var(--text-lg);
	font-weight: var(--font-weight-semibold);
	line-height: 1.3;
}

.prose :is(h1, h2) {
	font-size: var(--text-2xl);
}

.prose > * + :is(h1, h2, h3, h4, h5, h6) {
	margin-top: 24px;
}

/* Editors wrap heading text in <strong>; `bolder` would push it past semibold. */
.prose :is(h1, h2, h3, h4, h5, h6) strong {
	font-weight: inherit;
}

/* Tabs */

.tabs {
	display: flex;
	gap: 20px;
	margin-bottom: 24px;
	overflow-x: auto;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.tab {
	padding: 0 0 10px;
	border-bottom: 2px solid transparent;
	color: var(--ink-muted);
	font-size: 13px;
	cursor: pointer;
}

.tab[aria-current="page"] {
	color: var(--ink-strong);
}

.tab[aria-current="page"] {
	border-bottom-color: var(--ink-strong);
}

.tab-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.event-main:has(.tab-input) .tab-panel {
	display: none;
}

.event-main:has(#tab-about:checked) #panel-about,
.event-main:has(#tab-schedule:checked) #panel-schedule,
.event-main:has(#tab-speakers:checked) #panel-speakers,
.event-main:has(#tab-sponsors:checked) #panel-sponsors {
	display: block;
}

.event-main:has(#tab-about:checked) [for="tab-about"],
.event-main:has(#tab-schedule:checked) [for="tab-schedule"],
.event-main:has(#tab-speakers:checked) [for="tab-speakers"],
.event-main:has(#tab-sponsors:checked) [for="tab-sponsors"] {
	border-bottom-color: var(--ink-strong);
	color: var(--ink-strong);
}

/* The active tab already names the panel; the heading stays for screen readers. */
.event-main:has(.tab-input) .tab-panel > .section-title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.event-main:has(.tab-input:focus-visible) .tabs {
	outline: 2px solid var(--ink-muted);
	outline-offset: 4px;
}

/* Schedule */

.schedule-row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 2px 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--border);
}

.schedule-time {
	grid-row: span 2;
	color: var(--ink-muted);
	font-variant-numeric: tabular-nums;
}

.schedule-title {
	color: var(--ink-strong);
	font-weight: 500;
}

.schedule-speaker {
	color: var(--ink-muted);
	font-size: 14px;
}

/* Speakers */

.speakers {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 20px;
}

.speaker {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.speaker-avatar {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin-bottom: 8px;
	border-radius: 50%;
	background: var(--surface-raised);
	color: var(--ink-strong);
	font-size: 20px;
	object-fit: cover;
}

.speaker-name {
	color: var(--ink-strong);
	font-size: 14px;
	font-weight: 500;
}

.speaker-role {
	color: var(--ink-muted);
	font-size: 13px;
}

/* Sponsors */

.sponsor-tier + .sponsor-tier {
	margin-top: 40px;
}

.sponsor-tier-title {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
	color: var(--ink-muted);
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.sponsor-tier-title::after {
	flex: 1;
	height: 1px;
	background: var(--border);
	content: "";
}

.sponsor-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 32px 24px;
}

.sponsor {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	color: var(--ink-strong);
	text-align: center;
	text-decoration: none;
}

.sponsor-logo {
	max-width: 120px;
	height: 56px;
	object-fit: contain;
}

.sponsor-name {
	font-weight: 500;
}

/* Aside */

.event-aside .label:first-child {
	margin-top: 0;
}

.aside-block + .aside-block {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

.aside-value {
	color: var(--ink-strong);
	font-size: 14px;
	font-weight: 500;
}

.venue-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.venue-link:hover {
	text-decoration: underline;
}

/* The arrow only fills the middle of Lucide's 24px box, so the markup crops the box to the
   glyph. Centred on the line it sits above the lowercase letters; 1px brings it level. */
.venue-link .icon {
	position: relative;
	top: 1px;
	flex-shrink: 0;
	width: 12px;
	height: 12px;
	color: var(--ink-muted);
}

.aside-note {
	margin-top: 4px;
	color: var(--ink-muted);
	font-size: 13px;
	white-space: pre-line;
	text-wrap: pretty;
}

.online-place {
	display: flex;
	align-items: center;
	gap: 8px;
}

.online-place .icon {
	flex-shrink: 0;
	color: var(--ink-muted);
}

/* Hangs the note under the label text, clear of the icon (16px) and the gap (8px). */
.online-place + .aside-note {
	padding-left: 24px;
}

.date-row {
	display: flex;
	align-items: center;
	gap: 14px;
}

.date-badge {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	width: 48px;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: 8px;
	text-align: center;
}

.date-badge-month {
	padding: 3px 0;
	background: var(--surface-raised);
	color: var(--ink-muted);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1;
	text-transform: uppercase;
}

/* Trimmed to the digits' cap height and baseline, so the padding is even above and below. */
.date-badge-day {
	padding: 8px 4px;
	color: var(--ink-strong);
	font-family: var(--font-title);
	font-size: 24px;
	line-height: 1.2;
	text-box: trim-both cap alphabetic;
}

.date-range {
	display: grid;
	gap: 12px;
}

.date-range-heading {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.date-range-title {
	color: var(--ink-strong);
	font-family: var(--font-title);
	font-size: 22px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.date-range-day-count {
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--surface-raised);
	color: var(--ink-muted);
	font-size: 12px;
	white-space: nowrap;
}

.date-timeline {
	position: relative;
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0 0 0 16px;
	list-style: none;
	color: var(--ink-strong);
	font-size: 14px;
}

/* The rail joins the two dots */
.date-timeline::before {
	position: absolute;
	top: 10px;
	bottom: 10px;
	left: 3px;
	width: 1px;
	background: var(--border);
	content: "";
}

.date-timeline li {
	position: relative;
}

.date-timeline li::before {
	position: absolute;
	top: 6px;
	left: -16px;
	width: 7px;
	height: 7px;
	box-sizing: border-box;
	border: 1px solid var(--ink-muted);
	border-radius: 999px;
	background: var(--page-bg);
	content: "";
}

.date-timeline-label {
	display: inline-block;
	width: 52px;
	color: var(--ink-muted);
}

.date-timeline-time {
	color: var(--ink-muted);
	font-variant-numeric: tabular-nums;
}

.venue-map {
	width: 100%;
	height: 160px;
	margin-bottom: 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.host-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.host-row,
.link-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.host-logo {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	background: var(--surface-raised);
	color: var(--ink-strong);
	object-fit: contain;
}

.links .host-list {
	gap: 2px;
}

.link-row {
	margin-inline: -6px;
	padding: 6px;
	border-radius: var(--radius);
	transition: background-color 150ms ease-out;
}

.link-row .host-logo,
.link-external {
	transition:
		background-color 150ms ease-out,
		color 150ms ease-out;
}

.link-external {
	width: 14px;
	height: 14px;
	margin-left: auto;
	color: var(--ink-muted);
}

.narrow-links {
	display: none;
}

/* Listing */

.listing-filters {
	margin-top: 24px;
}

.event-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px;
}

.event-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.event-card-image {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 1;
	margin-bottom: 8px;
	border-radius: var(--radius);
	background: var(--surface-raised);
	object-fit: cover;
	transition: opacity 150ms ease;
}

.event-card-date,
.event-card-place {
	color: var(--ink-muted);
	font-size: 13px;
}

.event-card-title {
	color: var(--ink-strong);
	font-weight: 500;
}

.event-card-live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ink-red-7);
	font-size: 13px;
	font-weight: 500;
}

.live-dot {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

.live-dot::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: inherit;
	animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
	75%,
	100% {
		transform: scale(2);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.live-dot::before {
		animation: none;
	}
}

.empty-state {
	color: var(--ink-muted);
}

/* Footer */

.site-footer {
	display: flex;
	flex-direction: column;
	gap: 64px;
	margin-top: 32px;
	padding: 32px 8px 24px;
	border-top: 1px solid var(--border);
	color: var(--ink-muted);
	font-size: 13px;
}

.footer-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
	gap: 32px;
}

.footer-about {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.footer-logo {
	width: auto;
	height: 24px;
}

/* The bundled wordmark as a shape, in the footer's muted ink. */
span.footer-logo {
	aspect-ratio: 313 / 244;
	background-color: currentColor;
	mask: url("/assets/buzz/images/buzz-logo-no-bg.svg") center / contain no-repeat;
}

.footer-address {
	max-width: 28ch;
	white-space: pre-line;
}

.footer-groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 24px;
}

.footer-group-label {
	margin-bottom: 10px;
	color: var(--ink-strong);
	font-size: 13px;
	font-weight: 500;
}

.footer-groups ul {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.footer-bottom,
.footer-end {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 16px;
}

.footer-end {
	margin-left: auto;
}

.site-footer a {
	display: flex;
}

.back-to-top {
	align-items: center;
	gap: 6px;
}

.back-to-top .icon {
	width: 14px;
	height: 14px;
}

@media (max-width: 640px) {
	.footer-main {
		grid-template-columns: 1fr;
	}

	.footer-end {
		margin-left: 0;
	}
}

@media (pointer: coarse) {
	.site-footer a {
		min-height: 44px;
		align-items: center;
	}

	.footer-groups ul {
		gap: 0;
	}
}

/* Motion */

:root {
	--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

.btn,
.es-button,
.mode-toggle,
.site-nav summary {
	transition:
		transform 160ms var(--ease-out),
		background-color 150ms ease,
		border-color 150ms ease,
		color 150ms ease;
}

.btn:not([aria-disabled]):active,
.es-button:active,
.mode-toggle:active,
.site-nav summary:active {
	transform: scale(0.97);
}

.event-card {
	transition: transform 160ms var(--ease-out);
}

/* Softer than buttons: the featured cards are large enough that 0.97 reads as rubbery. */
.event-card:active {
	transform: scale(0.98);
}

.tab,
.menu a,
.menu button,
.site-footer a {
	transition:
		color 150ms ease,
		background-color 150ms ease,
		border-color 150ms ease;
}

.menu {
	transform-origin: top right;
	transition:
		opacity 150ms var(--ease-out),
		transform 150ms var(--ease-out);
}

@starting-style {
	.site-nav details[open] .menu {
		opacity: 0;
		transform: scale(0.97) translateY(-4px);
	}
}

/* Page-to-page navigation fades through the background instead of swapping in one frame;
   unsupported browsers navigate as before. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}

	@view-transition {
		navigation: auto;
		types: page;
	}
}

/* Named so they stay put while the content fades; a plain crossfade ghosts two layouts over each other. */
.site-header {
	view-transition-name: site-header;
}

:root:active-view-transition-type(page)::view-transition-old(root) {
	animation: 90ms ease-out both page-fade-out;
}

:root:active-view-transition-type(page)::view-transition-new(root) {
	animation: 180ms var(--ease-out) 60ms both page-fade-in;
}

@keyframes page-fade-out {
	to {
		opacity: 0;
	}
}

@keyframes page-fade-in {
	from {
		opacity: 0;
	}
}

::view-transition-old(root),
::view-transition-new(root) {
	animation-duration: 200ms;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--ink-muted);
	outline-offset: 2px;
}

/* Touch devices fire hover on tap, so hover styles only apply to real pointers. */
@media (hover: hover) and (pointer: fine) {
	.mode-toggle:hover {
		background: var(--surface-raised);
	}

	.menu a:hover,
	.menu button:hover {
		background: var(--border);
	}

	.btn-primary:hover {
		background: var(--accent-hover);
	}

	.link-row:hover {
		background: var(--surface-raised);
	}

	.link-row:hover .host-logo {
		background: var(--border);
	}

	.link-row:hover .link-external {
		color: var(--ink-strong);
	}

	.tab:hover,
	.site-footer a:hover {
		color: var(--ink-strong);
	}

	.event-card:hover .event-card-image {
		opacity: 0.85;
		transition-duration: 0ms;
	}
}

@media (prefers-reduced-motion: reduce) {
	.btn:not([aria-disabled]):active,
	.es-button:active,
	.event-card:active,
	.mode-toggle:active,
	.site-nav summary:active {
		transform: none;
	}

	@starting-style {
		.site-nav details[open] .menu {
			transform: none;
		}
	}
}

@media (max-width: 720px) {
	.event-banner {
		border: 1px solid var(--border);
	}

	.event-meta {
		display: flex;
	}

	.event-intro {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
	}

	/* The meta row under the title carries when and where on a narrow screen. */
	.event-aside {
		display: none;
	}

	.narrow-links {
		display: block;
		margin-bottom: 24px;
	}

	.prose {
		font-size: 16px;
		line-height: 1.75;
	}

	/* The tab rule runs to the screen edges, past the page gutter. */
	.tabs {
		margin-inline: -16px;
		padding-inline: 16px;
	}

	.event-columns {
		grid-template-columns: minmax(0, 1fr);
	}

	.schedule-row {
		grid-template-columns: 1fr;
	}

	.schedule-time {
		grid-row: auto;
	}
}
