/*
Theme Name: A Childhood Scream
Description: A bespoke WordPress theme for Adam Richards’s debut memoir.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: a-childhood-scream
*/

:root {
	--acs-navy: #040f1a;
	--acs-cream: #fff2dc;
	--acs-gold: #edb85d;
	--acs-content-width: 74rem;
}

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

body {
	margin: 0;
	background: var(--acs-navy);
	color: var(--acs-cream);
	font-family: system-ui, sans-serif;
	line-height: 1.65;
}

h1, h2, h3, .site-title {
	font-family: Georgia, serif;
	line-height: 1.15;
}

a {
	color: var(--acs-gold);
	text-underline-offset: 0.2em;
}

a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

img {
	max-inline-size: 100%;
	block-size: auto;
}

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

.skip-link:focus {
	inset: 1rem auto auto 1rem;
	z-index: 100001;
	inline-size: auto;
	block-size: auto;
	clip-path: none;
	padding: 0.65rem 1rem;
	background: var(--acs-cream);
	color: var(--acs-navy);
}

@font-face {
	font-family: "Cormorant Garamond";
	src: url("assets/fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2");
	font-style: italic;
	font-weight: 600;
	font-display: swap;
}

.coming-soon {
	position: relative;
	isolation: isolate;
	display: grid;
	place-items: center;
	min-block-size: 100vh;
	min-block-size: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
	overflow: hidden;
	overflow: clip;
	padding: clamp(2rem, 8vh, 5rem) 1rem;
	padding-block-end: clamp(3.5rem, 15vh, 8rem);
	background: #061627;
	text-align: center;
}

.coming-soon__stage,
.coming-soon__stage img,
.coming-soon__glitter {
	position: absolute;
	inset: 0;
	inline-size: 100%;
	block-size: 100%;
}

.coming-soon__stage img {
	max-inline-size: none;
	object-fit: cover;
	object-position: center bottom;
}

@media (max-aspect-ratio: 2/3) {
	.coming-soon__stage img {
		/* Keep the curtains and the floor in frame on tall phones. */
		object-fit: fill;
	}
}

.coming-soon__copy {
	position: relative;
	inline-size: min(100%, 34rem);
	padding-inline: 0.5rem;
	text-shadow: 0 0.1rem 1.1rem #020a14;
}

.coming-soon__copy > * {
	margin: 0;
}

.coming-soon__author,
.coming-soon__memoir,
.coming-soon__status {
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.55;
	letter-spacing: 0.26em;
	text-transform: uppercase;
}

.coming-soon__author {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.85rem;
	color: #f8ddb0;
}

.coming-soon__author::before,
.coming-soon__author::after {
	content: "";
	inline-size: clamp(0.9rem, 4vw, 2.8rem);
	block-size: 1px;
	background: linear-gradient(to right, transparent, #dba653);
}

.coming-soon__author::after {
	transform: scaleX(-1);
}

.coming-soon__copy .coming-soon__title {
	max-inline-size: 5.85em;
	margin: 0.22em auto 0;
	color: var(--acs-cream);
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(2.8rem, 7.8vw, 5.15rem);
	font-style: italic;
	font-weight: 600;
	line-height: 0.86;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.coming-soon__copy .coming-soon__subtitle {
	margin-block-start: 0.5em;
	color: #efbe69;
	font: italic 600 clamp(1.45rem, 4vw, 2.35rem)/1.05 "Cormorant Garamond", Georgia, serif;
}

.coming-soon__copy .coming-soon__memoir {
	margin-block-start: 1.5rem;
	color: #f9e8ca;
	letter-spacing: 0.2em;
}

.coming-soon__copy .coming-soon__status {
	margin-block-start: 0.8rem;
	color: #eac788;
	font-size: 0.66rem;
}

.coming-soon__status::before {
	content: "";
	display: block;
	inline-size: 3.25rem;
	block-size: 1px;
	margin: 0 auto 0.8rem;
	background: linear-gradient(to right, transparent, #edbf70, transparent);
	box-shadow: 0 0 0.65rem #eeb96680;
}

.coming-soon__glitter {
	pointer-events: none;
}

.coming-soon__glitter span {
	position: absolute;
	inset: var(--y) auto auto var(--x);
	inline-size: var(--size, 0.36rem);
	aspect-ratio: 1;
	opacity: 0.4;
	filter: drop-shadow(0 0 0.38rem #e8a84f);
}

.coming-soon__glitter span::after {
	content: "";
	display: block;
	block-size: 100%;
	background: #ffe4aa;
	clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}

.coming-soon__glitter span:nth-child(1) { --x: 14%; --y: 28%; --size: 0.9rem; --delay: 150ms; }
.coming-soon__glitter span:nth-child(2) { --x: 22%; --y: 41%; --delay: 650ms; }
.coming-soon__glitter span:nth-child(3) { --x: 12%; --y: 59%; --delay: 850ms; }
.coming-soon__glitter span:nth-child(4) { --x: 21%; --y: 69%; --size: 0.65rem; --delay: 1050ms; }
.coming-soon__glitter span:nth-child(5) { --x: 28%; --y: 78%; --delay: 400ms; }
.coming-soon__glitter span:nth-child(6) { --x: 85%; --y: 24%; --delay: 750ms; }
.coming-soon__glitter span:nth-child(7) { --x: 78%; --y: 36%; --size: 0.8rem; --delay: 300ms; }
.coming-soon__glitter span:nth-child(8) { --x: 89%; --y: 54%; --delay: 600ms; }
.coming-soon__glitter span:nth-child(9) { --x: 83%; --y: 65%; --size: 0.6rem; --delay: 1150ms; }
.coming-soon__glitter span:nth-child(10) { --x: 73%; --y: 77%; --delay: 900ms; }

@media (max-width: 38rem) {
	.coming-soon__copy .coming-soon__title {
		font-size: clamp(2.55rem, 10.8vw, 3.65rem);
	}

	.coming-soon__glitter span:nth-child(2),
	.coming-soon__glitter span:nth-child(7) {
		display: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.coming-soon__copy > * {
		animation: acs-title-entrance 760ms cubic-bezier(0.2, 0.65, 0.32, 1) var(--reveal-delay, 0ms) both;
	}

	.coming-soon__title { --reveal-delay: 180ms; }
	.coming-soon__subtitle { --reveal-delay: 430ms; }
	.coming-soon__memoir { --reveal-delay: 650ms; }
	.coming-soon__status { --reveal-delay: 850ms; }

	@supports (background-clip: text) {
		.coming-soon__copy .coming-soon__title {
			background: linear-gradient(110deg, #fff2dc 40%, #e4ad53 48%, #fffbe9 50%, #fff2dc 58%);
			background-size: 250% 100%;
			background-position: 100% 50%;
			background-clip: text;
			color: transparent;
			text-shadow: none;
			filter: drop-shadow(0 0.14rem 0.7rem #020a14);
			animation: acs-title-entrance 760ms cubic-bezier(0.2, 0.65, 0.32, 1) var(--reveal-delay) both,
				acs-title-shimmer 1.55s ease-in-out 1.05s both;
		}
	}

	.coming-soon__glitter span {
		animation: acs-glitter 2.5s ease-in-out var(--delay) both;
	}
}

@keyframes acs-title-entrance {
	from { opacity: 0; transform: translateY(0.65rem); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes acs-title-shimmer {
	from { background-position: 100% 50%; }
	to { background-position: 0% 50%; }
}

@keyframes acs-glitter {
	0% { opacity: 0.12; transform: scale(0.35); }
	40% { opacity: 0.95; transform: scale(1.45); }
	100% { opacity: 0.4; transform: scale(1); }
}

@media (forced-colors: active) {
	.coming-soon__copy .coming-soon__title {
		color: CanvasText;
	}
}

.site-header, .site-main, .site-footer {
	inline-size: min(100% - 2rem, var(--acs-content-width));
	margin-inline: auto;
}

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding-block: 1.5rem;
	border-bottom: 1px solid #705536;
}

.site-title {
	font-size: clamp(1.25rem, 4vw, 1.75rem);
	text-decoration: none;
}

.site-menu, .site-menu ul {
	list-style: none;
	padding-inline-start: 0;
}

.site-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
}

.site-main {
	padding-block: clamp(1.75rem, 5vw, 4rem);
	overflow-wrap: anywhere;
}

.entry-content {
	max-inline-size: 72ch;
}

.entry-content > :first-child {
	margin-block-start: 0;
}

.site-footer {
	padding-block: 1rem;
	border-top: 1px solid #705536;
}
