/* The Experience Loft — Toronto, dusk. */

:root {
	--ink: #0d1020;
	--ink-2: #151a2e;
	--glass: rgba(13, 16, 32, 0.78);
	--paper: #f3ece0;
	--muted: #b8b1a6;
	--dim: #7f7a86;
	--brass: #c9a061;
	--brass-hi: #e2c07a;
	--line: rgba(201, 160, 97, 0.32);
	--red: #d84a3a;
	--serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
	--sans: 'Instrument Sans', 'Helvetica Neue', Helvetica, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
	--gutter: clamp(16px, 3vw, 32px);
	--ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

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

html,
body {
	margin: 0;
	height: 100%;
	background: var(--ink);
	color: var(--paper);
	font: 400 16px/1.55 var(--sans);
	-webkit-font-smoothing: antialiased;
	overflow: hidden;
	overscroll-behavior: none;
}

a {
	color: inherit;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

:focus-visible {
	outline: 1px solid var(--brass-hi);
	outline-offset: 3px;
}

.fml-skip {
	position: fixed;
	left: var(--gutter);
	top: -100px;
	z-index: 100;
	padding: 8px 14px;
	background: var(--brass);
	color: var(--ink);
	font: 500 13px var(--mono);
}

.fml-skip:focus {
	top: 12px;
}

/* ------------------------------------------------------------------ stage */

.fml-stage {
	position: fixed;
	inset: 0;
	cursor: grab;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

.fml-stage.is-dragging {
	cursor: grabbing;
}

.fml-stage.is-pointing {
	cursor: pointer;
}

.fml-stage canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.fml-stage::after {
	/* vignette */
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(5, 6, 14, 0.55) 100%);
}

.fml-markers {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
}

.fml-marker {
	position: absolute;
	left: 0;
	top: 0;
	margin: -15px 0 0 -15px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font: 500 10px/1 var(--mono);
	letter-spacing: 0.02em;
	color: var(--brass-hi);
	background: rgba(13, 16, 32, 0.72);
	border: 1px solid var(--brass);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	pointer-events: auto;
	opacity: 0;
	transition: opacity 0.4s, background 0.2s, color 0.2s;
}

.fml-marker::before {
	content: '';
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 1px solid var(--brass);
	opacity: 0;
	animation: fml-ping 2.8s var(--ease) infinite;
}

.fml-entered .fml-marker {
	opacity: 1;
}

.fml-marker.is-hidden {
	opacity: 0 !important;
	pointer-events: none;
}

.fml-marker:hover,
.fml-marker.is-hot {
	background: var(--brass);
	color: var(--ink);
}

@keyframes fml-ping {
	0% {
		transform: scale(0.8);
		opacity: 0.8;
	}
	70%,
	100% {
		transform: scale(1.5);
		opacity: 0;
	}
}

/* -------------------------------------------------------------------- bar */

.fml-bar {
	position: fixed;
	z-index: 20;
	top: 0;
	left: 0;
	right: 0;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px;
	background: linear-gradient(rgba(8, 10, 22, 0.7), transparent);
	pointer-events: none;
}

.fml-bar > * {
	pointer-events: auto;
}

.fml-mark {
	text-decoration: none;
	display: grid;
	line-height: 1.2;
	justify-self: start;
}

.fml-mark__name {
	font: italic 400 24px/1 var(--serif);
	letter-spacing: 0.005em;
}

.fml-mark__role {
	font: 400 10.5px/1.4 var(--mono);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
	margin-top: 4px;
}

.fml-compass {
	display: flex;
	align-items: center;
	gap: 10px;
	font: 400 10.5px var(--mono);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
	opacity: 0;
	transition: opacity 0.6s 0.4s;
}

.fml-entered .fml-compass {
	opacity: 1;
}

.fml-compass b {
	color: var(--brass-hi);
	font-weight: 500;
}

.fml-compass__ring {
	position: relative;
	width: 26px;
	height: 26px;
	border: 1px solid var(--line);
	border-radius: 50%;
	transform: rotate(var(--heading, 0deg));
}

.fml-compass__needle,
.fml-compass__needle::after {
	position: absolute;
	left: 50%;
	top: 3px;
	bottom: 50%;
	width: 2px;
	margin-left: -1px;
	background: var(--brass-hi);
	border-radius: 2px;
}

/* the south half of the needle */
.fml-compass__needle::after {
	content: '';
	top: 100%;
	bottom: auto;
	height: 100%;
	background: var(--dim);
}

.fml-cta {
	justify-self: end;
	text-decoration: none;
	font: 500 11px var(--mono);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 10px 14px;
	border: 1px solid var(--line);
	background: rgba(13, 16, 32, 0.5);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	white-space: nowrap;
}

.fml-cta:hover {
	background: var(--brass);
	border-color: var(--brass);
	color: var(--ink);
}

/* ------------------------------------------------------------------ intro */

.fml-intro {
	position: fixed;
	inset: 0;
	z-index: 30;
	display: grid;
	align-items: end;
	padding: var(--gutter);
	padding-bottom: calc(clamp(40px, 10vh, 110px) + env(safe-area-inset-bottom));
	background:
		linear-gradient(180deg, rgba(8, 10, 22, 0.1) 0%, rgba(8, 10, 22, 0.55) 55%, rgba(8, 10, 22, 0.92) 100%),
		radial-gradient(80% 60% at 50% 110%, rgba(216, 120, 70, 0.25), transparent 70%);
	transition: opacity 1s var(--ease), visibility 0s 1s;
}

.fml-entered .fml-intro {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.fml-intro__inner {
	max-width: 760px;
	margin: 0 auto;
	width: 100%;
	text-align: center;
}

.fml-intro__inner > * {
	opacity: 0;
	transform: translateY(14px);
	animation: fml-rise 1.1s var(--ease) forwards;
}

.fml-intro__inner > :nth-child(2) {
	animation-delay: 0.12s;
}
.fml-intro__inner > :nth-child(3) {
	animation-delay: 0.24s;
}
.fml-intro__inner > :nth-child(4) {
	animation-delay: 0.36s;
}
.fml-intro__inner > :nth-child(5) {
	animation-delay: 0.48s;
}
.fml-intro__inner > :nth-child(6) {
	animation-delay: 0.6s;
}

@keyframes fml-rise {
	to {
		opacity: 1;
		transform: none;
	}
}

.fml-intro__kicker {
	margin: 0 0 18px;
	font: 400 11px var(--mono);
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--brass-hi);
}

.fml-intro__title {
	margin: 0;
	font: 400 clamp(52px, 11vw, 132px) / 0.92 var(--serif);
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.fml-intro__title em {
	color: var(--brass-hi);
}

.fml-intro__lede {
	margin: 22px auto 0;
	max-width: 36ch;
	font-size: clamp(16px, 2vw, 19px);
	color: var(--muted);
	text-wrap: balance;
}

.fml-intro__progress {
	width: min(240px, 60%);
	height: 1px;
	margin: 34px auto 0;
	background: var(--line);
	overflow: hidden;
}

.fml-intro__progress span {
	display: block;
	height: 100%;
	background: var(--brass-hi);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.4s var(--ease);
}

.fml-built .fml-intro__progress {
	visibility: hidden;
	height: 0;
	margin-top: 0;
}

.fml-intro__enter {
	margin-top: 26px;
	padding: 15px 30px;
	font: 500 12px var(--mono);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ink);
	background: var(--brass);
	border: 1px solid var(--brass);
	transition: background 0.25s, color 0.25s, opacity 0.3s;
}

.fml-intro__enter:hover {
	background: transparent;
	color: var(--brass-hi);
}

.fml-intro__enter:disabled {
	opacity: 0.25 !important;
	cursor: progress;
	background: transparent;
	color: var(--muted);
	border-color: var(--line);
}

.fml-intro__hint {
	margin: 16px 0 0;
	font: 400 10.5px var(--mono);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--dim);
}

/* ------------------------------------------------------------------- dock */

.fml-dock {
	position: fixed;
	z-index: 20;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 28px var(--gutter) calc(14px + env(safe-area-inset-bottom));
	background: linear-gradient(transparent, rgba(8, 10, 22, 0.75));
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.8s 0.5s var(--ease), transform 0.8s 0.5s var(--ease);
	pointer-events: none;
}

.fml-entered .fml-dock {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.fml-dock ol {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	display: flex;
	gap: 2px;
	justify-content: safe center;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}

.fml-dock ol::-webkit-scrollbar {
	display: none;
}

.fml-dock li {
	flex: none;
	scroll-snap-align: start;
}

.fml-dock button {
	display: flex;
	align-items: baseline;
	gap: 6px;
	padding: 8px 9px;
	border: 1px solid transparent;
	background: rgba(13, 16, 32, 0.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	white-space: nowrap;
	transition: border-color 0.2s, background 0.2s;
}

.fml-dock button:hover {
	border-color: var(--line);
}

.fml-dock button[aria-pressed='true'] {
	border-color: var(--brass);
	background: rgba(201, 160, 97, 0.14);
}

.fml-dock__n {
	font: 500 10px var(--mono);
	color: var(--brass-hi);
}

.fml-dock__label {
	font-size: 12px;
	color: var(--paper);
}

/* --------------------------------------------------------------- placards */

.fml-placard {
	position: fixed;
	z-index: 25;
	top: 84px;
	right: var(--gutter);
	max-height: calc(100vh - 84px - 88px);
	width: min(420px, calc(100vw - 2 * var(--gutter)));
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 28px 28px 32px;
	background: var(--glass);
	backdrop-filter: blur(18px) saturate(1.2);
	-webkit-backdrop-filter: blur(18px) saturate(1.2);
	border: 1px solid var(--line);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	transform: translateX(24px);
	transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s 0.45s;
	scrollbar-width: thin;
	scrollbar-color: var(--line) transparent;
}

.fml-placard.is-open {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0.15s, 0.15s, 0s;
}

.fml-placard:focus {
	outline: none;
}

.fml-placard__head {
	position: relative;
	padding-right: 36px;
	padding-bottom: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--line);
}

.fml-placard__kicker {
	margin: 0 0 12px;
	font: 400 10.5px var(--mono);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.fml-placard__kicker span {
	color: var(--brass-hi);
	margin-right: 8px;
}

.fml-placard__title {
	margin: 0;
	font: 400 clamp(30px, 3.2vw, 38px) / 1.02 var(--serif);
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.fml-placard__meta {
	margin: 10px 0 0;
	font-size: 14px;
	color: var(--brass-hi);
}

.fml-placard__close {
	position: absolute;
	top: -6px;
	right: -8px;
	width: 36px;
	height: 36px;
	font-size: 24px;
	line-height: 1;
	color: var(--muted);
	transition: color 0.2s, transform 0.3s var(--ease);
}

.fml-placard__close:hover {
	color: var(--brass-hi);
	transform: rotate(90deg);
}

.fml-placard__body {
	font-size: 15px;
	color: #ddd6ca;
}

.fml-placard__body > * + * {
	margin-top: 18px;
}

:where(.fml-placard__body) p {
	margin: 0;
}

.fml-placard h3 {
	margin: 0 0 6px;
	font: 500 10.5px var(--mono);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--brass-hi);
}

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

.fml-list li {
	position: relative;
	padding-left: 20px;
}

.fml-list li + li {
	margin-top: 10px;
}

.fml-list li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 0.72em;
	width: 9px;
	height: 1px;
	background: var(--brass);
}

.fml-roles {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fml-roles li {
	display: grid;
	grid-template-columns: 1fr auto;
	column-gap: 12px;
	padding: 12px 0;
	border-top: 1px solid rgba(201, 160, 97, 0.14);
}

.fml-roles li:first-child {
	border-top: 0;
	padding-top: 0;
}

.fml-roles__co {
	font-weight: 600;
	color: var(--paper);
}

.fml-roles__role {
	grid-column: 1;
	font-size: 14px;
	color: var(--muted);
}

.fml-roles__dates {
	grid-column: 2;
	grid-row: 1;
	font: 400 11px/1.9 var(--mono);
	color: var(--dim);
	white-space: nowrap;
}

.fml-shelves {
	display: grid;
	gap: 16px;
}

.fml-shelves p {
	font-size: 14px;
}

.fml-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fml-chips li {
	padding: 6px 11px;
	font: 400 12px var(--mono);
	border: 1px solid var(--line);
	color: var(--paper);
}

.fml-chips span {
	color: #7fd08a;
}

.fml-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	margin: 0;
	background: var(--line);
	border: 1px solid var(--line);
}

.fml-stats div {
	padding: 14px 16px;
	background: var(--ink-2);
}

.fml-stats dt {
	font: 400 10px var(--mono);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.fml-stats dd {
	margin: 4px 0 0;
	font: 400 44px/1 var(--serif);
	color: var(--brass-hi);
}

.fml-button {
	display: inline-block;
	padding: 12px 18px;
	font: 500 11px var(--mono);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ink);
	background: var(--brass);
	transition: background 0.2s;
}

.fml-button:hover {
	background: var(--brass-hi);
}

.fml-dash {
	display: grid;
	gap: 20px;
}

.fml-dash ul:not(.fml-chips) {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fml-dash ul:not(.fml-chips) li {
	display: flex;
	justify-content: space-between;
	padding: 5px 0;
	border-bottom: 1px dashed rgba(201, 160, 97, 0.16);
	font-size: 14px;
}

.fml-dash b {
	font: 500 13px var(--mono);
	color: var(--brass-hi);
}

.fml-dash strong {
	font: 400 32px/1 var(--serif);
	color: var(--brass-hi);
}

.fml-note {
	margin-top: 6px !important;
	font-size: 12px;
	color: var(--dim);
}

/* ------------------------------------------------------------------ phone */

@media (max-width: 760px) {
	.fml-bar {
		grid-template-columns: 1fr auto;
	}

	.fml-compass {
		position: fixed;
		top: calc(70px + env(safe-area-inset-top));
		left: var(--gutter);
	}

	.fml-mark__name {
		font-size: 21px;
	}

	.fml-mark__role {
		font-size: 9.5px;
		letter-spacing: 0.08em;
	}

	.fml-cta {
		padding: 9px 11px;
		font-size: 10px;
	}

	.fml-dock ol {
		justify-content: flex-start;
	}

	.fml-placard {
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-height: 58vh;
		max-height: 58dvh;
		padding: 22px var(--gutter) calc(28px + env(safe-area-inset-bottom));
		border-width: 1px 0 0;
		transform: translateY(40px);
	}

	.fml-has-open .fml-dock {
		opacity: 0;
		pointer-events: none;
	}

	.fml-placard__title {
		font-size: 28px;
	}
}

/* ------------------------------------------- no WebGL / no JS: a plain page */

.fml-nogl,
.fml-nogl body {
	overflow: auto;
	height: auto;
}

.fml-nogl .fml-stage,
.fml-nogl .fml-intro__progress,
.fml-nogl .fml-intro__enter,
.fml-nogl .fml-intro__hint,
.fml-nogl .fml-compass,
.fml-nogl .fml-dock,
.fml-nogl .fml-placard__close {
	display: none;
}

.fml-nogl .fml-bar {
	grid-template-columns: 1fr auto;
	position: sticky;
	background: var(--ink);
}

.fml-nogl .fml-intro {
	position: static;
	min-height: 60vh;
	opacity: 1;
	visibility: visible;
}

.fml-nogl .fml-placards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
	gap: 16px;
	padding: var(--gutter);
	max-width: 1280px;
	margin: 0 auto;
}

.fml-nogl .fml-placard {
	position: static;
	width: auto;
	max-height: none;
	opacity: 1;
	visibility: visible;
	transform: none;
	overflow: visible;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}
}
