/*
Theme Name: Regentis
Author: Regentis
Description: A minimal block theme for the Regentis blog, built for WordPress 7.0.
Version: 0.1.0
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: regentis
Tags: blog, one-column, block-patterns, full-site-editing
*/

/*
 * theme.json owns every design token. This file holds only the rules
 * theme.json cannot express, scoped to the r-* classes set in the block
 * markup. Colors always come from the theme.json presets so the Midnight
 * style variation keeps working.
 */

/* Smooth in-page scrolling, guarded for reduced motion. */
html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/*
 * Visually hidden text. WordPress does not ship .screen-reader-text on the
 * block-theme frontend; the home template uses it for its H1.
 */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--wp--preset--color--surface);
	border-radius: 3px;
	box-shadow: 0 0 2px 2px color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	clip: auto !important;
	clip-path: none;
	color: var(--wp--preset--color--primary);
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Mono labels (.r-label) and eyebrows (.r-eyebrow = label + 26px dash). */
.r-label,
.r-eyebrow {
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.r-label a,
.r-eyebrow a {
	text-decoration: none;
}

.r-eyebrow {
	align-items: center;
	column-gap: 10px;
	display: flex;
	flex-wrap: wrap;
}

.r-eyebrow::before {
	background: currentColor;
	content: "";
	flex: none;
	height: 1px;
	width: 26px;
}

/* Thin vertical rule between the site title and the Journal word mark. */
.r-vrule {
	align-self: center;
	background: var(--wp--preset--color--border);
	height: 16px;
	width: 1px;
}

/* Cards: hairline border, 14px radius, quiet hover. */
.r-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	transition: border-color 0.15s ease;
}

.r-card:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--border) 55%, var(--wp--preset--color--muted));
}

@media (prefers-reduced-motion: reduce) {
	.r-card {
		transition: none;
	}
}

.r-card .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.r-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

/* Tag chips for post-terms lists carrying .r-tags. */
.r-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.r-tags .wp-block-post-terms__separator {
	display: none;
}

.r-tags a {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.08em;
	padding: 3px 11px;
	text-decoration: none;
}

.r-tags a:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 45%, transparent);
	color: var(--wp--preset--color--primary);
}

/* Breadcrumbs (regentis/breadcrumbs renders nothing until registered). */
.r-breadcrumbs {
	color: var(--wp--preset--color--muted);
}

.r-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.r-breadcrumbs a:hover {
	color: var(--wp--preset--color--primary);
}

/*
 * Navy bands. The band background stays dark in both the default and the
 * Midnight variation, so its ink is derived from the mode-stable band-accent
 * preset instead of a text preset that flips with the mode.
 */
.r-band {
	color: color-mix(in srgb, var(--wp--preset--color--band-accent) 12%, white);
}

.r-band :is(h1, h2, h3, h4, h5, h6) {
	color: inherit;
}

.r-band-soft {
	color: color-mix(in srgb, var(--wp--preset--color--band) 34%, white);
}

/* "In the product" cross-link band: gold hairline on the gold-soft ground. */
.r-xlink {
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 30%, transparent);
}

/* Footer sitemap lists. */
.r-plain-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.r-plain-list li {
	padding: 3px 0;
}

.r-plain-list a,
.r-footnote a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.r-plain-list a:hover,
.r-footnote a:hover {
	color: var(--wp--preset--color--primary);
}

/* Pagination pills. */
.r-paging .page-numbers {
	align-items: center;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--muted);
	display: inline-flex;
	height: 32px;
	justify-content: center;
	min-width: 32px;
	padding: 0 10px;
	text-decoration: none;
}

.r-paging .page-numbers.current {
	background: var(--wp--preset--color--band);
	border-color: var(--wp--preset--color--band);
	color: color-mix(in srgb, var(--wp--preset--color--band-accent) 12%, white);
	font-weight: 600;
}

.r-paging a.page-numbers:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--border) 55%, var(--wp--preset--color--muted));
	color: var(--wp--preset--color--contrast);
}

.r-paging .wp-block-query-pagination-previous,
.r-paging .wp-block-query-pagination-next {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.r-paging .wp-block-query-pagination-previous:hover,
.r-paging .wp-block-query-pagination-next:hover {
	color: var(--wp--preset--color--primary);
}

/* Brand logo in the header (pattern: regentis/brand). */
.r-brand {
	display: block;
	line-height: 0;
}

.r-brand img {
	height: 18px;
	width: auto;
	display: block;
}

/* Author initials avatar (byline + author card). */
.r-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--wp--preset--color--band);
	color: var(--wp--preset--color--band-accent);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.r-avatar-lg {
	width: 44px;
	height: 44px;
	font-size: 0.78rem;
}

/* Category filter chips (home toolbar). */
.r-filter {
	margin: 0;
	font-size: 0.78rem;
}

.r-filter a {
	display: inline-block;
	padding: 4px 13px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.r-filter a:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.r-filter-on a {
	background: var(--wp--preset--color--accent-soft);
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 40%, transparent);
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

/* Search pill (home toolbar). */
.r-search .wp-block-search__input {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--muted);
	padding: 5px 16px;
	font-size: 0.78rem;
}

.r-search .wp-block-search__input:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
}

/* Newsletter subscribe form (footer band). */
.r-subscribe {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 4px 0 0;
}

.r-subscribe-field {
	min-width: 230px;
	padding: 8px 18px;
	font-size: 0.82rem;
	font-family: inherit;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--band-accent) 30%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, #ffffff 5%, transparent);
	color: inherit;
	text-align: left;
}

.r-subscribe-field::placeholder {
	color: color-mix(in srgb, currentColor 55%, transparent);
}

.r-subscribe-field:focus-visible,
.r-subscribe-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--band-accent);
	outline-offset: 2px;
}

.r-subscribe-button {
	padding: 8px 20px;
	font-size: 0.82rem;
	font-family: inherit;
	font-weight: 700;
	border: none;
	border-radius: 999px;
	background: var(--wp--preset--color--band-accent);
	color: var(--wp--preset--color--band);
	cursor: pointer;
}

.r-subscribe-button:hover {
	background: color-mix(in srgb, var(--wp--preset--color--band-accent) 88%, #ffffff);
}
/* Archive: newest post renders as a full-width hero card; the rest hide their image. */
.r-archive-grid > li:first-child {
	grid-column: 1 / -1;
}

.r-archive-grid > li:first-child .r-card {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	column-gap: 34px;
	row-gap: 10px;
	align-items: start;
	padding: 28px 32px;
}

.r-archive-grid > li:first-child .r-card > * {
	grid-column: 1;
}

.r-archive-grid > li:first-child .r-card > .wp-block-post-featured-image {
	grid-column: 2;
	grid-row: 1 / span 4;
	align-self: center;
	margin: 0;
}

.r-archive-grid > li:first-child .wp-block-post-title {
	font-size: var(--wp--preset--font-size--xx-large);
}

.r-archive-grid > li:not(:first-child) .wp-block-post-featured-image {
	display: none;
}

.r-archive-grid > li:not(:first-child) .r-meta-author {
	display: none;
}

@media (max-width: 680px) {
	.r-archive-grid > li:first-child .r-card {
		display: block;
	}

	.r-archive-grid > li:first-child .r-card > .wp-block-post-featured-image {
		margin-bottom: 12px;
	}
}
