/*
Theme Name: Kyon Ball
Description: Romantic Noir poster site for Kyon Ball. Everything is edited under Appearance > Customize > Kyon Ball.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kyon-ball
*/

:root {
	--ink: #000000;
	--bone: #eadfcc;
	--tan: #d4b59a;
	--button: #eadfcc;
	--title: "Ultra", "Rockwell Extra Bold", Rockwell, Georgia, serif;
	--body: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--script: "Allura", "Snell Roundhand", "Apple Chancery", cursive;
	--gutter: clamp(16px, 4vw, 64px);
	--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
	--specks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='s' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 -6.1'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23s)'/%3E%3C/svg%3E");
}

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

html { background: var(--ink); -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100vh;
	background: var(--ink);
	color: var(--bone);
	font-family: var(--body);
	font-size: 16px;
	line-height: 1.5;
	overflow-x: hidden;
}

/* Late light through a window, from the brand's palette card and portraits */
body::before {
	content: "";
	position: fixed;
	inset: -10%;
	z-index: 0;
	pointer-events: none;
	background: repeating-linear-gradient(112deg, transparent 0 8vw, rgba(212, 181, 154, .1) 8vw 13vw);
	filter: blur(26px);
	-webkit-mask-image: radial-gradient(ellipse 70% 80% at 85% 25%, #000, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 80% at 85% 25%, #000, transparent 75%);
}

/* Film grain over the whole page */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 50;
	pointer-events: none;
	background: var(--grain);
	opacity: .1;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Navigation ---------------------------------------------------------- */
.site-header {
	position: relative;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 3vw;
	padding: clamp(20px, 3.4vw, 44px) 12vw 0;
}

.site-nav { flex: 1; min-width: 0; }

.site-nav ul {
	display: flex;
	justify-content: space-between;
	gap: 2vw;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	color: var(--tan);
	font-size: clamp(11px, .9vw, 15px);
	font-weight: 700;
	letter-spacing: .12em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color .2s;
}

.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--bone); }

.social { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 28px); margin: 0; padding: 0; list-style: none; }
.social a { display: block; color: var(--bone); opacity: .9; transition: opacity .2s; }
.social a:hover { opacity: .6; }
.social svg { display: block; width: clamp(16px, 1.3vw, 22px); height: clamp(16px, 1.3vw, 22px); }

.menu-toggle { display: none; }

/* Portrait behind the poster ------------------------------------------ */
/* Fills the screen behind the words, dimmed so the type stays readable. */
.portrait {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 25%;
	opacity: .34;
	filter: sepia(.35) saturate(1.1) brightness(.72) contrast(1.05);
}

.portrait--empty { inset: 12vh auto 6vh 60vw; width: 27vw; }

/* Poster -------------------------------------------------------------- */
.poster {
	--w: 36.3vw;
	position: relative;
	z-index: 1;
	width: var(--w);
	margin: 3.2vw 0 0 16.8vw;
	padding-bottom: 3vw;
	container-type: inline-size;
	text-transform: uppercase;
}

/* Ink wear: dark specks sit over the type and vanish into the background */
.poster::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: var(--specks);
}

.line { display: block; margin: 0; font-weight: 400; line-height: 1; color: var(--tan); }

.fit {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	width: 100%;
	white-space: nowrap;
}

.fit > span { flex: none; }
.fit > .gap { width: .42em; }

.line--name { color: var(--bone); font: 400 9.8cqw/1 var(--title); margin-bottom: 6.4cqw; padding: 0 6cqw; }
.line--wide { font: 400 15.6cqw/1 var(--title); margin-bottom: 6.4cqw; }
.line--tall { font: 400 9.6cqw/1 var(--title); margin-bottom: 6.4cqw; }
.line--huge { font: 400 19cqw/1 var(--title); margin-bottom: 6cqw; }

.statement {
	margin: 0 0 4.4cqw;
	color: var(--bone);
	font: 400 7.4cqw/1.12 var(--script);
	text-align: center;
	text-transform: none;
	text-wrap: balance;
}

.poster > .tickets { margin-bottom: 10cqw; }

.show { margin: 0 0 9cqw; }
.show__head { display: flex; align-items: center; justify-content: space-between; gap: 4cqw; margin-bottom: 3.6cqw; }

.venue {
	display: block;
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: .08em 3cqw .12em;
	color: var(--bone);
	font: 400 12cqw/1.1 var(--script);
	text-transform: none;
	text-align: center;
	white-space: nowrap;
}

.show--split .venue { flex: 0 1 58%; padding-right: 0; text-align: left; font-size: 12.6cqw; }

.show__notes { flex: none; color: var(--tan); font: 700 2.6cqw/1.7 var(--body); letter-spacing: .24em; text-align: left; }
.show__notes span { display: block; white-space: nowrap; }

.line--date { font: 400 8.6cqw/1 var(--title); margin-bottom: 5.4cqw; }

.tickets {
	position: relative;
	z-index: 3;
	display: block;
	padding: 1.3cqw 1cqw;
	background: var(--button);
	color: var(--ink);
	font: 700 max(11px, 2.3cqw)/1.5 var(--body);
	letter-spacing: .16em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background .2s;
}

a.tickets:hover { background: var(--tan); }
.tickets.is-empty { background: transparent; box-shadow: inset 0 0 0 1px var(--tan); color: var(--tan); }

/* Image placeholders --------------------------------------------------- */
.ph {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 12px;
	border: 1px dashed var(--tan);
	color: var(--tan);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
}

.ph strong { color: var(--bone); font-size: 14px; }
.ph em { max-width: 26ch; color: var(--tan); font-size: 11px; font-style: normal; font-weight: 400; letter-spacing: .02em; text-transform: none; }
.portrait .ph { height: 100%; }

/* Inner pages ---------------------------------------------------------- */
.page-wrap {
	position: relative;
	z-index: 1;
	width: min(1040px, 100% - 2 * var(--gutter));
	min-height: 60vh;
	margin: clamp(40px, 6vw, 88px) auto clamp(56px, 8vw, 120px);
}

.page-wrap > .poster-title {
	margin: 0 0 clamp(32px, 5vw, 64px);
	color: var(--tan);
	font: 400 clamp(30px, 5.6vw, 72px)/1.12 var(--title);
	text-transform: uppercase;
	text-wrap: balance;
}

.page-content { max-width: 62ch; margin-bottom: 48px; font-size: 18px; line-height: 1.65; }
.page-content strong { color: var(--tan); font-weight: 700; }
.page-content p { margin: 0 0 1.1em; }
.credits { margin: 0; color: var(--tan); font-size: 13px; font-weight: 700; letter-spacing: .12em; line-height: 1.8; text-transform: uppercase; }
.credits a { color: var(--bone); }
.lede { margin: 0 0 24px; color: var(--bone); font: 400 clamp(30px, 3.4vw, 42px)/1.15 var(--script); }
.page-content a { color: var(--bone); }

.grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.grid__item { display: block; color: var(--bone); text-decoration: none; }
.grid__item img { width: 100%; height: auto; object-fit: cover; }
.grid__item h2 { margin: 12px 0 0; font-size: 15px; font-weight: 700; line-height: 1.3; text-transform: uppercase; }
a.grid__item:hover h2 { color: var(--tan); }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.split .page-content { margin-bottom: 24px; }
.split__media img { width: 100%; filter: sepia(.25) brightness(.8) contrast(1.05); }

.tour-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--tan); }
.tour-list li { display: grid; grid-template-columns: 150px 1fr auto; gap: 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--tan); }
.tour-list .when { color: var(--tan); font: 400 clamp(22px, 2.2vw, 28px)/1 var(--title); }
.tour-list .where { font: 400 clamp(30px, 3.2vw, 42px)/1.1 var(--script); }
.tour-list .city { display: block; color: var(--tan); font: 700 12px/1.6 var(--body); letter-spacing: .2em; text-transform: uppercase; }
.tour-list .tickets { min-width: 200px; padding: 8px 14px; font-size: 11px; }

.button-large { display: inline-block; padding: 14px 40px; background: var(--button); color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-decoration: none; text-transform: uppercase; }
.button-large:hover { background: var(--tan); }

/* Footer --------------------------------------------------------------- */
.site-footer a { color: inherit; text-decoration: none; }
.site-footer em { font-style: normal; opacity: .75; }

.site-footer {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 28px 12vw 36px;
	color: var(--tan);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

/* Tablet and phone ------------------------------------------------------ */
@media (max-width: 900px) {
	.site-header { padding: 18px 16px 0; }

	.menu-toggle {
		display: block;
		padding: 8px 0;
		border: 0;
		background: none;
		color: var(--tan);
		font: 700 13px/1 var(--body);
		letter-spacing: .12em;
		text-transform: uppercase;
		cursor: pointer;
	}

	.site-nav {
		position: fixed;
		inset: 0;
		z-index: 40;
		display: none;
		align-items: center;
		justify-content: center;
		background: var(--ink);
	}

	.nav-open .site-nav { display: flex; }
	.nav-open .menu-toggle { position: fixed; top: 18px; left: 16px; z-index: 41; }
	.site-nav ul { flex-direction: column; align-items: center; gap: 28px; }
	.site-nav a { font-size: 20px; }
	.social svg { width: 20px; height: 20px; }

	.portrait { position: fixed; inset: 60px 0 0; width: auto; }
	.portrait img { opacity: .34; object-fit: contain; object-position: top center; }

	.portrait--empty { position: static; inset: auto; width: min(60vw, 280px); aspect-ratio: 2 / 3; margin: 28px auto 0; }

	.poster { --w: calc(100vw - 32px); margin: 36px auto 0; padding-bottom: 56px; }
	.grid { --cols: 2 !important; }
	.split { grid-template-columns: 1fr; }
	.split__media { max-width: 280px; }
	.tour-list .tickets { min-width: 0; }
	.tour-list li { grid-template-columns: 1fr; gap: 10px; }
	.site-footer { flex-direction: column; padding: 28px 16px 36px; text-align: center; }
}

@media (max-width: 480px) {
	.grid { --cols: 1 !important; }
}

/* Phones: keep the photo behind the words. Overrides the older phone layout saved in Customize > Additional CSS. */
@media (max-width: 900px) {
	html body.home .poster { --w: calc(100vw - 32px); margin: 36px auto 0; padding-bottom: 56px; }
	html body.home .portrait { inset: 60px 0 0; width: auto; }
	html body.home .portrait img { opacity: .34; object-fit: contain; object-position: top center; }
	html body.home .show__head { flex-direction: row; align-items: center; gap: 4cqw; }
	html body.home .show--split .venue { flex: 0 1 58%; width: auto; padding-left: 3cqw; font-size: 12.6cqw; }
	html body.home .show__notes { font-size: 2.6cqw; }
}
