/*
Theme Name: Yellow Step Records
Theme URI: https://yellowsteprecords.com/
Author: Paul Botwid
Description: Block theme for Yellow Step Records.
Version: 2.0.1
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: yellowstep
*/

/*
 * Colours, fonts, type sizes and layout widths are set in theme.json.
 * This file only holds what theme.json cannot express.
 */

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h2,
h3,
h4 {
	text-wrap: balance;
}

/* Links the old way: a visited colour and an instant inverted block on hover. */
a:visited {
	color: var(--wp--preset--color--visited);
}

a:hover,
a:visited:hover {
	background: var(--wp--preset--color--black);
	color: var(--wp--preset--color--yellow);
	text-decoration: none;
}

a:focus-visible {
	outline: 2px solid var(--wp--preset--color--black);
	outline-offset: 2px;
}

/* Links that wrap the logo or an image get no hover block. */
.wp-block-yellowstep-logo a:hover,
.release-grid .release > a:hover,
.wp-block-image a:hover,
.wp-block-post-featured-image a:hover {
	background: none;
}

/* Images are flat boxes with a hard edge. */
.wp-block-image img,
.wp-block-post-featured-image img,
.release-grid img.cover {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: auto;
	border: 1px solid var(--wp--preset--color--black);
}

/* Thick rules between sections. */
.wp-block-separator {
	border: 0;
	border-top: 0.3rem solid currentColor;
	opacity: 1;
}

/* Small tracked capitals: taglines and footnotes. */
.ys-caps {
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.35em;
	/* Tracking adds space after the last letter; indent by the same amount to stay optically centred. */
	text-indent: 0.35em;
}

/* The header, content and footer sit flush; each sets its own spacing. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

/* Header */
.site-header {
	padding-top: 2rem;
	padding-bottom: 2rem;
}

.wp-block-yellowstep-logo svg {
	display: block;
	width: 100%;
	height: auto;
}

.wp-block-yellowstep-logo a {
	display: block;
}

.site-header .wp-block-yellowstep-logo {
	width: 14rem;
	max-width: 52%;
}

/* Footer */
.site-footer {
	padding-bottom: 5rem;
}

.site-footer h1 {
	margin-bottom: 0.5rem;
}

.site-footer .ys-caps {
	margin-top: 2.5rem;
}

/* Landing: a title can sit on top of the feature image. */
.landing-feature {
	position: relative;
}

.landing-feature h1 {
	position: absolute;
	top: 4rem;
	left: 4rem;
	right: 4rem;
	z-index: 1;
	margin: 0;
	color: var(--wp--preset--color--yellow);
}

/* Release grid block */
.release-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 3rem;
	margin-top: 2rem;
	margin-bottom: 2rem;
}

.release-grid img.cover {
	margin-bottom: 0.5rem;
}

.release-grid h3,
.release-grid h4,
.release-grid p {
	margin: 0;
}

.release-grid h4 {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	line-height: 1.4;
}

.release-grid p {
	margin-top: 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: rgba(17, 17, 17, 0.8);
}

/* Single release */
.release-single {
	gap: 4rem;
}

.release-single h2 + h4 {
	margin-top: 0.25rem;
}

.release-single .wp-block-post-content {
	margin-top: 1.25rem;
}

/* Enter page (the Blank template): everything centred in the window. */
.enter-page {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100vh;
	min-height: 100svh;
	box-sizing: border-box;
	padding-top: 2rem;
	padding-bottom: 2rem;
}

.enter-page .wp-block-yellowstep-logo {
	width: 22rem;
	max-width: 70vw;
	margin-bottom: 1.75rem;
}

.enter-page .enter-link {
	margin-top: 3rem;
	font-size: 0.75rem;
	font-weight: 600;
}

.enter-page .enter-link a {
	display: inline-block;
	padding: 0.4em 0.5em;
	text-decoration: none;
}

.enter-page .enter-link a:visited {
	color: var(--wp--preset--color--black);
}

.enter-page .enter-link a:visited:hover {
	color: var(--wp--preset--color--yellow);
}

@media screen and (max-width: 60rem) {
	.release-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 2rem;
	}
}

@media screen and (max-width: 700px) {
	.release-grid {
		grid-template-columns: 1fr;
	}

	.release-single {
		gap: 2rem;
	}

	.landing-feature h1 {
		top: 1.5rem;
		left: 1.5rem;
		right: 1.5rem;
	}
}
