@font-face {
    font-family: Joan;
    src: url(fonts/Joan-Regular.ttf);
}
@font-face {
    font-family: Garamond;
    src: url(fonts/EBGaramond-VariableFont_wght.ttf);
}
@font-face {
    font-family: GaramondItalic;
    src: url(fonts/EBGaramond-Italic-VariableFont_wght.ttf);
}
@font-face {
    font-family: Pica;
    src: url(fonts/IMFellDWPica-Regular.ttf);
}
@font-face {
    font-family: PicaItalic;
    src: url(fonts/IMFellDWPica-Italic.ttf);
}

:root {
    --background: #221816;
    --page-width: min(950px, calc(100vw - 1rem));
    --page-width-narrow: min(700px, calc(100vw - 2rem));
    --page-width-wide: min(1250px, calc(100vw - 1rem));
    --blob-transition: 10s;
    --artist-transition: 0.25s;

    --artist-heading: 1.25rem;
    --small-artist-heading: 0.85rem;
    --tiny-artist-heading: 0.65rem;
    --tall: 140px;
    --wide: 130px;
    --thin: 75px;
    --short: 50px;
}
html {
    font-size: 20px;
    font-family: PicaItalic;
    color: white;
}
.full-width-clip {
    width: 100vw;
    overflow-x: clip;
}
.page-width, .page-width-narrow, .page-width-wide {
    margin-left: auto;
    margin-right: auto;
    position: relative;
}
.page-width {
    width: var(--page-width);
    padding: 0 calc(calc(100vw - var(--page-width-width)) / 2);
}
.page-width-narrow {
    width: var(--page-width-narrow);
    padding: 0 calc(calc(100vw - var(--page-width-narrow)) / 2);
}
.page-width-wide {
    width: var(--page-width-wide);
    padding: 0 calc(calc(100vw - var(--page-width-wide)) / 2);
}
body {
    margin: 0;
    background-color: var(--background);
    max-width: 100vw;
    overflow-x: clip;
    position: relative;
}
a:has(h1):hover img {
    opacity: 0.75;
}
h1 {
    display: flex;
    justify-content: center;
    position: relative;
}
h1 > span {
    color: transparent;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 75px;
    pointer-events: none;
}
h1 > img {
    max-width: min(20rem, 60%);
}
h2 {
    font-size: 2rem;
    font-weight: normal;
    margin: 0;
}
p {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.75);
}
.p-large {
    font-size: 2rem;
}
p.flex {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 1rem;
}
p.flex > span:nth-child(even){
    text-align: right;
}
.tt-widget {
    filter: hue-rotate(180deg) saturate(0.7)
}
.relative {
    position: relative;
}
.white {
    color: white;
}
.centred-header {
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 0.35rem;
}
.map {
    margin-bottom: 5rem;
    display: block;
    position: relative;
    overflow-x: clip;
}
.map-background {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%);
    max-height: 130%;
    z-index: -1;
    mask-image: url(images/backgrounds/scan-mask-1.png);
    background-color: var(--background);
    mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    opacity: 0.5;
}
#blob-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.blob {
    position: absolute;
    transform: translate(-50%, -50%);
    transition: left var(--blob-transition), top var(--blob-transition), width var(--blob-transition), filter var(--blob-transition), opacity var(--blob-transition);
    transition-timing-function: ease-in-out;
    mix-blend-mode: hard-light;
    pointer-events: none;
    z-index: -2;
}
.unselectable {
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}
.blob-background {
    background-image: url('images/backgrounds/blur-blob-blue-large.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.blob-background-yellow {
    background-image: url('images/backgrounds/blur-blob-yellow-large.png');
}
.timetable {
    display: flex;
    gap: 1rem;
    position: relative;
}
.timetable-background {
    background-color: white;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
}
.timetable-column {
    display: flex;
    flex-direction: column;
    transition: flex-basis var(--artist-transition);
}
.timetable-column:not(:has(.timetable-time)){
    flex-basis: 1%; /* Value doesn't matter just sets them equal */
    flex-grow: 1;
    flex-shrink: 1;
}
.timetable-column:has(.timetable-time){
    margin-right: 4px;
}
.timetable-time {
    display: flex;
    justify-content: end;
    align-items: center;
    position: relative;
}
.timetable-time:first-child {
    margin-top: 1rem;
}
.timetable-element:not(.timetable-time){
    display: flex;
    position: relative;
}
.venue-title-container {
    position: relative;
}
.venue-title {
    height: 3.25rem;
    margin: 0;
    font-size: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: end;
    padding: 0.5rem 0;
    box-sizing: border-box;
    text-align: center;
}
.venue-icon {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 10%);
    width: 100%;
    max-height: 300%;
    opacity: 0.5;
}
.grey {
    opacity: 0.5;
}
.pale {
    opacity: 0.25;
    z-index: -1;
}
.timetable-artist {
    flex-basis: 100%;
    background-color: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 5px;
    padding: 1px 0.5rem;
    box-sizing: border-box;
    margin: 1px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    width: 100%;
    container-type: size;
    container-name: timetable-artist-container;
    transition: background-color var(--artist-transition), box-shadow var(--artist-transition);
}
.timetable-element:has(.timetable-artist) {
    cursor: pointer;
    transition: max-height var(--artist-transition), flex-grow var(--artist-transition);
}
.timetable-artist h3 {
    margin: 0;
    font-size: var(--artist-heading);
    line-height: 1.25rem;
    font-weight: normal;
    transition: font-size var(--artist-transition);
    word-break: break-word;
}
.timetable-artist-background {
    background-color: white;
    position: absolute;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    left: 2px;
    top: 2px;
    mix-blend-mode: overlay;
    opacity: 0.25;
}
.event-badge {
    border-radius: 0 0 5px 5px;
    width: 100%;
    margin: 0 auto;
    font-size: 0.75rem;
    line-height: 0.75rem;
    opacity: 0.5;
    word-break: break-word;
}
.event-info {
    display: none;
}
.artist-bio {
    max-width: var(--page-width);
    text-align: left;
    padding: 1rem;
    position: relative;
    box-sizing: border-box;
}
.artist-bio a, .visual-artists a {
    display: block;
    color: rgba(255,255,255,0.75);
    text-align: center;
    text-decoration: none;
    margin-top: 0.25rem;
}
#timetable-info {
    position: fixed;
    left: 0;
    top: 0;
    padding: 0 2rem;
    width: calc(100vw - 4rem);
    height: 100vh;
    opacity: 0;
    background-color: transparent;
    transition: box-shadow var(--artist-transition), opacity var(--artist-transition), background-color var(--artist-transition);
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
}
#timetable-info.visible {
    background-color: rgba(0,0,0,0.9);
    box-shadow: 0 0 10rem 10rem black;
    opacity: 1;
    pointer-events: all;
}
#timetable-info h3 {
    font-size: 2rem;
}
#timetable-info h4 {
    font-size: 1.25rem;
    opacity: 0.75;
}
#timetable-info h3, #timetable-info h4 {
    margin: 0;
}
#timetable-info hr {
    width: 7rem;
}
.artist-info-container {
    overflow-y: auto;
    overscroll-behavior-y: contain;
    max-height: 17rem;
    background-color: rgba(255,255,255,0.2);
    margin: 1rem 0;
}
.artist-info-container:empty, .artist-info-container:has(.artist-bio:empty) {
    display: none;
}
.artist-info-container h4 {
    margin: 0.5rem 0 -0.5rem !important;
}

.visual-artists {
    margin-top: 2rem;
}
.visual-artists h2 {
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 0.35rem;
}
.visual-artists h3 {
    margin: 1rem 0 0;
}
.visual-artists p {
    margin: 0;
    font-size: 1rem;
    max-width: 35rem;
}
.visual-artists h3:nth-of-type(even){
    text-align: right;
}
.visual-artists p:nth-of-type(even){
    margin-left: auto;
}

@container timetable-artist-container ((min-width: 130px) and (min-height: 80px)){ /* Wide AND tall */
    /* Do nothing (default font size) */
}
@container timetable-artist-container ((max-width: 129px) or (max-height: 79px)){ /* Thin OR short */
    .timetable-artist h3, .timetable-artist .event-badge {
	font-size: var(--small-artist-heading);
	line-height: 0.75rem;
    }
}
@container timetable-artist-container (max-height: 120px){ /* Short */
    .timetable-artist h3 {
	font-size: var(--tiny-artist-heading);
	line-height: 0.75rem;
    }
    .timetable-artist .event-badge {
	display: none;
    }
}
@container timetable-artist-container ((max-width: 74px) or (max-height: 49px)){ /* Very thin OR very short */
    .timetable-artist h3, .timetable-artist .event-badge {
	font-size: var(--tiny-artist-heading);
    }
}

.timetable-time-line {
    display: block;
    position: absolute;
    left: calc(100% + 0.05rem);
    top: calc(50% - 1px);
    height: 0;
    border-top: 2px dotted white;
    width: calc(var(--page-width-wide) - 2rem);
    opacity: 0.15;
}

footer {
    text-align: center;
    margin: 2rem 0;
}
footer a {
    color: white;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}
footer > a {
    font-size: 1rem;
}
.website-credit {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}
.website-credit > a {
    color: rgba(255,255,255,0.75);
}

@media screen and (max-width: 1000px){ /* On mobile */
    :root {
	--small-artist-heading: 0.6rem;
    }
    h1 > span {
	font-size: 50px;
    }
    h2 {
	font-size: 1.5rem;
    }
    .map {
	margin: 2rem auto;
    }
    .timetable {
	gap: 0;
	overflow-x: scroll;
	overflow-y: clip;
	padding: 0 0.5rem;
	margin: 0;
    }
    .timetable-column:has(.timetable-time){
	position: sticky;
	left: 0;
    }
    .timetable-column:not(:has(.timetable-time)){
	min-width: 5rem;
    }
    .venue-title {
	font-size: 0.75rem;
	padding: 0.25rem;
    }
    .timetable-artist {
	padding: 0 0.1rem;
    }
    .visual-artists {
	margin-top: 0;
    }
    @container timetable-artist-container ((min-width: 149px) and (min-height: 69px)){ /* Wide AND tall */
	/* Do nothing (default font size) */
    }
    @container timetable-artist-container ((max-width: 149px) or (max-height: 69px)){ /* Thin OR short */
	.timetable-artist h3 {
	    font-size: var(--small-artist-heading);
	    line-height: 0.6rem;
	}
	.event-badge {
	    display: none;
	}
    }
}
