/*
 * Entertainment Revue - component styles.
 *
 * Tokens come from theme.json as --wp--preset--* custom properties. Nothing in
 * this file should hardcode a brand colour, size or spacing step; if a value is
 * missing, add it to theme.json rather than literal-ising it here.
 */

/* ---------------------------------------------------------------- aliases  */

:root {
	--er-pink: var(--wp--preset--color--pink);
	--er-pink-deep: var(--wp--preset--color--pink-deep);
	--er-pink-soft: var(--wp--preset--color--pink-soft);
	--er-purple-deep: var(--wp--preset--color--purple-deep);
	--er-purple: var(--wp--preset--color--purple);
	--er-purple-mid: var(--wp--preset--color--purple);
	--er-night: var(--wp--preset--color--night);
	--er-slate: var(--wp--preset--color--slate);
	--er-gold: var(--wp--preset--color--gold);
	--er-gold-light: var(--wp--preset--color--gold-light);
	--er-cream: var(--wp--preset--color--cream);
	--er-ink: var(--wp--preset--color--ink);
	--er-ink-muted: var(--wp--preset--color--ink-muted);
	--er-rule: var(--wp--preset--color--rule);
	--er-radius: 6px;
	--er-radius-lg: 10px;
}

/* ------------------------------------------------------------- primitives  */

.er-eyebrow {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Gold rule with a centred star, used under section headings and the hero. */
.er-rule-star {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-block: var(--wp--preset--spacing--20);
}

.er-rule-star::before {
	content: "";
	width: 56px;
	height: 1px;
	background: var(--er-gold);
}

.er-rule-star::after {
	content: "\2606"; /* outlined star */
	color: var(--er-gold);
	font-size: 0.95rem;
	line-height: 1;
}

.er-rule-star--center {
	justify-content: center;
}

/* Arrow link: "WATCH NOW ->", "AUDITION INFO ->" */
.er-arrow-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.er-arrow-link::after {
	content: "\2192";
	transition: transform 0.18s ease;
}

.er-arrow-link:hover::after {
	transform: translateX(3px);
}

/* ------------------------------------------------------------ block styles */

.wp-block-button.is-style-gold .wp-block-button__link {
	background-color: var(--er-pink);
	color: #fff;
}

.wp-block-button.is-style-gold .wp-block-button__link:hover {
	background-color: var(--er-pink-deep);
}

.wp-block-button.is-style-outline-ink .wp-block-button__link {
	background-color: transparent;
	border: 1px solid var(--er-rule);
	color: var(--er-ink);
}

.wp-block-button.is-style-outline-ink .wp-block-button__link:hover {
	border-color: var(--er-gold);
	background-color: transparent;
	color: var(--er-purple);
}

.wp-block-group.is-style-card {
	background: #fff;
	border: 1px solid var(--er-rule);
	border-radius: var(--er-radius-lg);
	box-shadow: var(--wp--preset--shadow--card);
}

/* ------------------------------------------------------------------- logo  */

/*
 * The artwork is stroke-only and inherits currentColor, so each context picks
 * its own colour. The source stroke was a pale yellow meant for dark panels and
 * would be near-invisible on this design's cream and white.
 */
.er-logo-link {
	display: inline-block;
	text-decoration: none;
	color: var(--er-gold);
}

.er-logo-link:hover {
	color: var(--er-pink);
}

.er-logo {
	display: block;
}

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

.er-header .er-logo {
	width: clamp(150px, 16vw, 200px);
}

.er-footer .er-logo {
	width: 168px;
}

/* On the purple CTA band the logo needs to read light. */
.er-cta .er-logo-link,
.er-auditions .er-logo-link {
	color: var(--wp--preset--color--gold-pale);
}

/* ----------------------------------------------------------------- header  */

.er-header {
	border-bottom: 1px solid var(--er-rule);
	background: #fff;
}

.er-header__inner {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--40);
}

.er-nav a {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--er-ink);
	text-decoration: none;
	padding-block: 0.5rem;
}

.er-nav a:hover {
	color: var(--er-pink);
}

.er-nav .current-menu-item > a {
	color: var(--er-pink);
	box-shadow: inset 0 -2px 0 0 var(--er-pink);
}

/* ------------------------------------------------------------------- hero  */

.er-hero {
	position: relative;
	overflow: hidden;
}

.er-hero__title {
	font-size: var(--wp--preset--font-size--display);
	line-height: 1.04;
	letter-spacing: -0.01em;
	margin: 0;
}

.er-hero__title .er-hero__accent {
	color: var(--er-pink);
	display: block;
}

.er-hero__lede {
	max-width: 34ch;
	color: var(--er-ink-muted);
}

/* ------------------------------------------------------- icon links strip  */

.er-iconlinks {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
}

.er-iconlinks__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.65rem;
	text-align: center;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--20);
	border-left: 1px solid var(--er-rule);
	text-decoration: none;
	color: inherit;
}

.er-iconlinks__item:first-child {
	border-left: 0;
}

.er-iconlinks__icon {
	color: var(--er-gold);
	line-height: 0;
}

.er-iconlinks__icon svg {
	width: 34px;
	height: 34px;
}

.er-iconlinks__title {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.er-iconlinks__text {
	font-size: var(--wp--preset--font-size--small);
	color: var(--er-ink-muted);
	max-width: 22ch;
	margin: 0;
}

.er-iconlinks__item::after {
	content: "\2192";
	color: var(--er-ink-muted);
	transition: transform 0.18s ease, color 0.18s ease;
}

.er-iconlinks__item:hover::after {
	color: var(--er-pink);
	transform: translateX(3px);
}

@media (max-width: 1024px) {
	.er-iconlinks {
		grid-template-columns: repeat(3, 1fr);
	}
	.er-iconlinks__item:nth-child(3n + 1) {
		border-left: 0;
	}
	.er-iconlinks__item:nth-child(n + 4) {
		border-top: 1px solid var(--er-rule);
	}
}

@media (max-width: 600px) {
	.er-iconlinks {
		grid-template-columns: repeat(2, 1fr);
	}
	.er-iconlinks__item:nth-child(3n + 1) {
		border-left: 1px solid var(--er-rule);
	}
	.er-iconlinks__item:nth-child(odd) {
		border-left: 0;
	}
	.er-iconlinks__item:nth-child(n + 3) {
		border-top: 1px solid var(--er-rule);
	}
}

/* ------------------------------------------------------------ events card  */

.er-events__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	margin-bottom: var(--wp--preset--spacing--30);
}

.er-events__title {
	color: var(--er-ink);
	margin: 0;
}

.er-event {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	padding-block: var(--wp--preset--spacing--20);
	border-top: 1px solid var(--er-rule);
	text-decoration: none;
	color: inherit;
}

.er-event:first-of-type {
	border-top: 0;
}

/* Date chip: month over day, bordered square */
.er-event__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 58px;
	padding: 0.4rem 0.5rem;
	background: var(--er-pink-soft);
	border: 1px solid transparent;
	border-radius: var(--er-radius);
}

.er-event__month {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--er-ink-muted);
}

.er-event__day {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.5rem;
	line-height: 1.05;
	color: var(--er-pink);
}

.er-event__name {
	font-weight: 700;
	color: var(--er-pink);
	margin: 0 0 0.15rem;
}

.er-event__meta {
	font-size: var(--wp--preset--font-size--small);
	color: var(--er-ink-muted);
	margin: 0;
}

.er-event__chevron {
	color: var(--er-ink-muted);
}

.er-event:hover .er-event__name {
	text-decoration: underline;
}

/* -------------------------------------------------------------- calendar   */

.er-calendar {
	border: 1px solid var(--er-rule);
	border-radius: var(--er-radius-lg);
	padding: var(--wp--preset--spacing--20);
}

.er-calendar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.65rem;
}

.er-calendar__month {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.05rem;
}

.er-calendar__nav {
	display: flex;
	gap: 0.35rem;
}

.er-calendar__nav a {
	color: var(--er-ink-muted);
	text-decoration: none;
	padding: 0.1rem 0.35rem;
	border-radius: 3px;
}

.er-calendar__nav a:hover {
	background: var(--er-cream);
	color: var(--er-purple);
}

.er-calendar table {
	width: 100%;
	border-collapse: collapse;
}

.er-calendar th {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--er-ink-muted);
	padding-block: 0.4rem;
	font-family: var(--wp--preset--font-family--body);
}

.er-calendar td {
	text-align: center;
	padding: 0.18rem;
	font-size: var(--wp--preset--font-size--small);
}

.er-calendar__day {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.95rem;
	height: 1.95rem;
	border-radius: 50%;
	text-decoration: none;
	color: var(--er-ink);
}

.er-calendar__day--muted {
	color: #BDB8B3;
}

.er-calendar__day--has-event {
	font-weight: 700;
	color: var(--er-pink);
}

.er-calendar__day--has-event:hover {
	background: var(--er-pink-soft);
}

.er-calendar__day--active {
	background: var(--er-pink);
	color: #fff;
	font-weight: 700;
}

/* --------------------------------------------------------- auditions card  */

.er-auditions {
	position: relative;
	overflow: hidden;
	border-radius: var(--er-radius-lg);
	background: var(--wp--preset--gradient--auditions-card);
	color: #fff;
}

.er-auditions :where(h1, h2, h3) {
	color: #fff;
}

.er-auditions__disciplines {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--gold-pale);
}

.er-auditions__disciplines span::after {
	content: "\2606";
	color: var(--er-gold-light);
	margin-left: 0.55rem;
}

.er-auditions__disciplines span:last-child::after {
	content: none;
}

.er-auditions .er-arrow-link {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ---------------------------------------------------------- booking band   */

.er-booking {
	position: relative;
	background: var(--wp--preset--color--cream-deep);
	overflow: hidden;
}

/* Faint outlined stars echoing the comp's background decoration. */
.er-booking__decor {
	position: absolute;
	inset: 0;
	pointer-events: none;
	color: var(--er-gold);
	opacity: 0.16;
}

.er-booking__categories {
	display: grid;
	grid-template-columns: repeat(4, auto);
	justify-content: start;
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--30);
}

.er-booking__category {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	text-align: center;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--er-ink-muted);
	max-width: 10ch;
}

.er-booking__category svg {
	width: 26px;
	height: 26px;
	color: var(--er-ink);
}

/* ------------------------------------------------------------ promo cards  */

.er-promos {
	display: grid;
	grid-template-columns: repeat(var(--er-promos-columns, 4), 1fr);
	gap: var(--wp--preset--spacing--30);
}

.er-promo__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--er-radius);
	margin-bottom: 0.85rem;
}

.er-promo__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.er-promo:hover .er-promo__media img {
	transform: scale(1.04);
}

.er-promo__title {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--er-purple);
	margin: 0 0 0.35rem;
}

.er-promo__text {
	font-size: var(--wp--preset--font-size--small);
	color: var(--er-ink-muted);
	margin: 0 0 0.6rem;
	max-width: 26ch;
}

@media (max-width: 900px) {
	.er-promos {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.er-promos {
		grid-template-columns: 1fr;
	}
	.er-booking__categories {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ------------------------------------------------------------- cast grid   */

.er-castgrid {
	display: grid;
	grid-template-columns: repeat(var(--er-castgrid-columns, 5), 1fr);
	gap: var(--wp--preset--spacing--20);
	list-style: none;
	margin: 0;
	padding: 0;
}

.er-castgrid__item a {
	display: block;
	text-decoration: none;
	color: inherit;
	text-align: center;
}

.er-castgrid__media {
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: var(--er-radius);
	background: rgba(26, 19, 15, 0.06);
	margin-bottom: 0.45rem;
}

.er-castgrid__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.er-castgrid__name {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.er-castgrid__role {
	display: block;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--er-ink-muted);
}

@media (max-width: 900px) {
	.er-castgrid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 520px) {
	.er-castgrid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/*
 * Hero artwork. The current file is cropped from the comp, so it is low
 * resolution and stands in only until real photography arrives.
 */
.er-hero__media {
	border-radius: var(--er-radius-lg);
	overflow: hidden;
	background: var(--er-night);
}

.er-hero__media img {
	display: block;
	width: 100%;
	height: auto;
}

.er-auditions__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--er-radius);
}

/* --------------------------------------------------------------- CTA band  */

.er-cta {
	background: var(--er-night);
	color: #fff;
}

.er-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--30);
	padding-block: var(--wp--preset--spacing--30);
}

.er-cta__lead {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	margin: 0;
}

.er-cta__lead::before {
	content: "\2606";
	color: var(--er-gold-light);
	margin-right: 0.6rem;
}

.er-cta__sub {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	color: var(--wp--preset--color--gold-pale);
	margin: 0;
}

/* ----------------------------------------------------------------- footer  */

.er-footer {
	background: var(--er-cream);
	color: var(--er-ink);
}

.er-footer__title {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--er-ink);
	margin: 0 0 0.9rem;
}

.er-footer a {
	color: var(--er-ink);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
}

.er-footer a:hover {
	color: var(--er-purple);
	text-decoration: underline;
}

.er-footer__social {
	display: flex;
	gap: 0.5rem;
}

.er-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: transparent;
	color: var(--er-ink);
}

.er-footer__social a:hover {
	color: var(--er-pink);
	background: transparent;
}

.er-footer__social svg {
	width: 15px;
	height: 15px;
}

.er-footer__legal {
	background: var(--er-slate);
	color: #fff;
}

.er-footer__legal .wp-block-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	padding-block: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--x-small);
}

.er-footer__legal p {
	margin: 0;
}

.er-footer__legal a {
	color: #fff;
	opacity: 0.85;
}

.er-footer__legal a:hover {
	color: #fff;
	opacity: 1;
}

/* ------------------------------------------------------------ a11y basics  */

.er-skip-link:focus {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1000;
	padding: 0.7rem 1rem;
	background: #fff;
	color: var(--er-ink);
	border-radius: var(--er-radius);
	box-shadow: var(--wp--preset--shadow--raised);
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--er-pink);
	outline-offset: 2px;
}

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

/* ------------------------------------------------------------ primary nav  */

.er-nav ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.er-nav li {
	margin: 0;
}

@media (max-width: 1100px) {
	.er-nav ul {
		gap: 0.9rem;
	}
	.er-nav a {
		font-size: 0.68rem;
		letter-spacing: 0.06em;
	}
}

@media (max-width: 860px) {
	.er-header__inner {
		flex-wrap: wrap;
		justify-content: center;
		gap: var(--wp--preset--spacing--20);
	}
	.er-nav ul {
		justify-content: center;
	}
}

/* --------------------------------------------------------- section titles  */

/* Gold dash leading the heading, as in the comp. */
.er-section-title {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	margin: 0 0 0.3rem;
}

.er-section-title::before {
	content: "";
	width: 38px;
	height: 2px;
	background: var(--er-gold);
	flex: none;
}

.er-section-sub {
	color: var(--er-ink-muted);
	margin: 0 0 var(--wp--preset--spacing--40);
}
