/*
 * The Beast — theme styles.
 * Tokens come from theme.json (--wp--preset--color--*).
 * Radius is 0 everywhere: square corners are part of the look.
 */

/* ---------- Page scaffold ---------- */

body {
	margin: 0;
}

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > main,
.beast-main {
	flex: 1;
}

@keyframes beast-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes beast-drift {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

/* ---------- Buttons ---------- */

.beast-btn {
	display: inline-flex;
	align-self: flex-start;
	padding: 13px 26px;
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 0;
	transition: background 150ms ease, color 150ms ease;
	cursor: pointer;
}

.beast-btn--orange {
	background: var(--wp--preset--color--orange);
}

.beast-btn--orange:hover {
	background: #ffffff;
	color: var(--wp--preset--color--orange);
}

.beast-btn--teal {
	background: var(--wp--preset--color--teal);
}

.beast-btn--teal:hover {
	background: #ffffff;
	color: var(--wp--preset--color--teal);
}

.beast-btn--mailto {
	background: var(--wp--preset--color--orange);
	padding: 12px 22px;
	letter-spacing: 0.02em;
	text-transform: none;
}

.beast-btn--mailto:hover {
	background: var(--wp--preset--color--ink);
	color: #ffffff;
}

/* ---------- Header (sticky) ---------- */

header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--wp--preset--color--sand);
	border-bottom: 3px solid var(--wp--preset--color--navy);
}

.beast-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 18px 40px;
}

.beast-header__logo {
	display: flex;
	align-items: center;
	gap: 14px;
}

.beast-header__logo img {
	height: 38px;
	width: auto;
	display: block;
}

.beast-header__nav {
	display: flex;
	gap: 28px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.beast-header__link,
.beast-header__link:hover {
	text-decoration: none;
}

.beast-header__link--magazine { color: var(--wp--preset--color--navy); }
.beast-header__link--about { color: var(--wp--preset--color--teal); }
.beast-header__link--advertise { color: var(--wp--preset--color--orange); }

.beast-header__link:hover {
	color: var(--wp--preset--color--ink);
}

/* ---------- Hero ---------- */

.beast-hero {
	position: relative;
	background: var(--wp--preset--color--ink);
	color: #ffffff;
	overflow: hidden;
}

.beast-montage {
	position: absolute;
	inset: -40px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	opacity: 0.55;
}

.beast-montage__row {
	display: flex;
	gap: 8px;
	width: max-content;
}

.beast-montage__row--a {
	animation: beast-drift 90s linear infinite;
}

.beast-montage__row--b {
	animation: beast-drift 120s linear infinite reverse;
}

@media (prefers-reduced-motion: reduce) {
	.beast-montage__row--a,
	.beast-montage__row--b {
		animation-play-state: paused;
	}
}

.beast-montage__tile {
	height: 300px;
	aspect-ratio: 178 / 251;
	background-color: #333333;
	background-position: center;
	background-size: cover;
}

/* Scrim between the montage and the hero content. */
.beast-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgba(10, 8, 6, 0.92) 0%, rgba(10, 8, 6, 0.72) 45%, rgba(10, 8, 6, 0.35) 100%);
	pointer-events: none;
}

.beast-hero__content {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	margin: 0 auto;
	padding: 96px 40px 104px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.beast-hero__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--archivo-black);
	font-size: clamp(38px, 5.5vw, 72px);
	line-height: 0.98;
	letter-spacing: -0.015em;
	text-transform: uppercase;
	text-wrap: pretty;
	max-width: 900px;
	color: #ffffff;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.beast-hero__lede {
	margin: 0;
	max-width: 640px;
	font-size: 19px;
	line-height: 1.55;
	color: var(--wp--preset--color--lede-on-dark);
	text-wrap: pretty;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.beast-hero__cta {
	margin-top: 8px;
}

/* ---------- Reader ---------- */

.beast-reader {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 40px 16px;
}

.beast-reader__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.beast-reader__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--archivo-black);
	font-size: 28px;
	text-transform: uppercase;
	letter-spacing: -0.01em;
}

.beast-reader__hint {
	font-size: 14px;
	color: var(--wp--preset--color--muted);
}

.beast-reader__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #111111;
	box-shadow: 0 12px 40px rgba(30, 20, 10, 0.18);
}

.beast-reader__frame.is-fading {
	animation: beast-fade-in 0.4s ease;
}

.beast-reader__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.beast-reader__openrow {
	display: flex;
	justify-content: flex-end;
	margin-top: 10px;
}

.beast-reader__open {
	font-size: 13px;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.beast-reader__open:hover {
	color: var(--wp--preset--color--navy);
}

/* ---------- Back issues ---------- */

.beast-backissues {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 40px 72px;
}

.beast-backissues__heading {
	margin: 0 0 6px;
	font-family: var(--wp--preset--font-family--archivo-black);
	font-size: 24px;
	text-transform: uppercase;
}

.beast-backissues__sub {
	margin: 0 0 24px;
	font-size: 15px;
	color: var(--wp--preset--color--muted);
}

.beast-backissues__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 24px;
}

.beast-issue-card {
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.beast-issue-card__cover {
	border: 3px solid transparent;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.beast-issue-card.is-active .beast-issue-card__cover {
	border-color: var(--wp--preset--color--navy);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.beast-issue-card__cover img {
	display: block;
	width: 100%;
	aspect-ratio: 178 / 251;
	object-fit: cover;
}

.beast-issue-card__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.beast-issue-card__month {
	font-size: 14px;
	font-weight: 700;
}

.beast-issue-card__label {
	font-size: 12px;
	color: var(--wp--preset--color--muted-light);
}

/* ---------- Archive CTA ---------- */

.beast-archive-cta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-top: 48px;
	padding: 40px;
	background: var(--wp--preset--color--ink);
	color: #ffffff;
	text-align: center;
}

.beast-archive-cta__title {
	font-family: var(--wp--preset--font-family--archivo-black);
	font-size: 24px;
	text-transform: uppercase;
}

.beast-archive-cta__sub {
	font-size: 15px;
	color: var(--wp--preset--color--muted-on-dark);
}

.beast-archive-cta .beast-btn {
	margin-top: 8px;
	align-self: center;
}

/* ---------- About / Advertise ---------- */

.beast-about {
	background: #ffffff;
	border-top: 3px solid var(--wp--preset--color--navy);
	padding: 64px 40px;
}

.beast-about__grid {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
}

.beast-about__col {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.beast-about__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--archivo-black);
	font-size: 22px;
	text-transform: uppercase;
	padding-bottom: 10px;
}

.beast-about__col--about .beast-about__heading {
	border-bottom: 3px solid var(--wp--preset--color--teal);
}

.beast-about__col--advertise .beast-about__heading {
	border-bottom: 3px solid var(--wp--preset--color--orange);
}

.beast-about__col p {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--wp--preset--color--body);
	text-wrap: pretty;
}

.beast-about__col .beast-btn {
	margin-top: 8px;
}

/* ---------- Standard pages ---------- */

.beast-page__inner {
	padding: 48px 40px 72px;
}

.beast-page__title {
	margin: 0 0 24px;
	font-family: var(--wp--preset--font-family--archivo-black);
	font-size: 28px;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	border-bottom: 3px solid var(--wp--preset--color--navy);
	padding-bottom: 10px;
}

.beast-page__inner p {
	color: var(--wp--preset--color--body);
}

@media (max-width: 700px) {
	.beast-page__inner {
		padding: 32px 20px 56px;
	}
}

/* ---------- Footer ---------- */

.beast-footer {
	padding: 24px 40px;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 13px;
	color: var(--wp--preset--color--muted-light);
}

.beast-footer a {
	color: var(--wp--preset--color--muted-light);
	text-decoration: none;
}

.beast-footer a:hover {
	color: var(--wp--preset--color--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 840px) {
	.beast-about__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 700px) {
	.beast-header {
		padding: 14px 20px;
		flex-wrap: wrap;
		gap: 12px;
	}

	.beast-header__nav {
		gap: 18px;
	}

	.beast-hero__content {
		padding: 64px 20px;
	}

	.beast-reader {
		padding: 40px 20px 12px;
	}

	.beast-backissues {
		padding: 32px 20px 56px;
	}

	.beast-backissues__grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 16px;
	}

	.beast-about {
		padding: 48px 20px;
	}

	.beast-footer {
		padding: 20px;
	}
}

@media (max-width: 600px) {
	/* Portrait reader so single pages stay legible on phones. */
	.beast-reader__frame {
		aspect-ratio: 3 / 4;
	}
}

/* ---------- Editor niceties ---------- */

.editor-styles-wrapper .beast-issue-card {
	pointer-events: none;
}
