/*
Theme Name: Halftime Glory
Theme URI: https://halftimeglory.com/
Author: Herbert L. Seward III
Author URI: https://halftimeglory.com/
Description: View From The Sidelines — a block theme for HalftimeGlory.com, dedicated to the pageantry, history and culture of HBCU marching bands. Every section is editable in Appearance › Editor.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: halftime-glory
Tags: blog, news, block-patterns, full-site-editing, custom-colors, custom-logo, editor-style, wide-blocks
*/

/* ------------------------------------------------------------------
   The small layer theme.json can't express. Colors and fonts come
   from the theme.json presets, so changing them in Styles carries
   through here too.
------------------------------------------------------------------- */

:root {
	--htg-ink: var(--wp--preset--color--ink);
	--htg-gold: var(--wp--preset--color--gold);
	--htg-crimson: var(--wp--preset--color--crimson);
	--htg-line-dark: var(--wp--preset--color--plum-line);
	--htg-line-light: var(--wp--preset--color--paper-line);
	--htg-condensed: var(--wp--preset--font-family--condensed);
	--htg-display: var(--wp--preset--font-family--display);
}

/* Links on dark sections read as light text, gold on hover. */
:is(.has-ink-background-color, .has-ink-deep-background-color, .has-night-background-color, .has-plum-background-color, .has-crimson-background-color) a:not(.wp-element-button) {
	color: inherit;
	text-decoration: none;
}
:is(.has-ink-background-color, .has-ink-deep-background-color, .has-night-background-color, .has-plum-background-color) a:not(.wp-element-button):hover {
	color: var(--htg-gold);
}

/* Post terms / dates given a text color keep it for their links. */
:is(.wp-block-post-terms, .wp-block-post-date, .wp-block-post-author-name).has-text-color a {
	color: inherit;
}

/* Core pads every colored group; these cards set their own spacing. */
.wp-block-group.htg-card,
.wp-block-group.htg-card-light,
.wp-block-group.htg-fifths,
.wp-block-group.htg-datebadge {
	padding: 0;
}
.has-crimson-background-color a:where(:not(.wp-element-button)):hover {
	text-decoration: underline;
}

/* Titles that are links don't look like body links. */
.wp-block-post-title a,
.htg-tile h3 a,
.htg-wordmark a {
	color: inherit;
	text-decoration: none;
}
.wp-block-post-title a:hover,
.htg-tile h3 a:hover {
	color: var(--wp--preset--color--crimson);
}
.has-ink-background-color .wp-block-post-title a:hover,
.has-plum-background-color .wp-block-post-title a:hover,
.has-ink-background-color .htg-tile h3 a:hover {
	color: var(--htg-gold);
}

/* Condensed uppercase label, used for kickers and small headings. */
.htg-kicker {
	font-family: var(--htg-condensed);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	line-height: 1.3;
}

/* ---------- Top bar ---------- */
.htg-topbar {
	font-family: var(--htg-condensed);
	font-weight: 500;
	font-size: 0.875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.htg-today {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}
.htg-today::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--htg-gold);
	flex: none;
}
.htg-topbar .wp-block-button__link {
	font-size: 0.875rem;
	padding: 0.45rem 0.9rem;
}

/* ---------- Masthead ---------- */
.htg-masthead {
	background-image: url(assets/images/yardlines.svg);
	background-size: cover;
	background-position: center;
}
.htg-wordmark {
	font-family: var(--htg-display);
	font-size: clamp(2.5rem, 6vw, 4.125rem);
	line-height: 0.95;
	letter-spacing: -0.005em;
	margin: 0;
}
.htg-wordmark em {
	color: var(--htg-gold);
}
.htg-masthead .wp-block-site-logo img {
	border-radius: 50%;
	border: 3px solid var(--htg-gold);
	background: var(--wp--preset--color--plum);
}
.htg-masthead .wp-block-search {
	flex: 0 1 340px;
	min-width: 0;
}
.htg-masthead .wp-block-search__inside-wrapper {
	border: 1px solid var(--htg-line-dark);
	background: var(--wp--preset--color--plum);
	border-radius: 6px;
	padding: 0;
	overflow: hidden;
}
.htg-masthead .wp-block-search__input {
	background: transparent;
	color: var(--wp--preset--color--cream);
	border: 0;
	min-height: 46px;
	padding: 0 14px;
	font-size: 0.9375rem;
}
.htg-masthead .wp-block-search__input::placeholder {
	color: var(--wp--preset--color--haze);
}
.htg-masthead .wp-block-search__button {
	margin: 0;
	border-radius: 0;
	min-width: 52px;
	padding: 0 14px;
	background: var(--htg-crimson);
	color: #fff;
}

/* ---------- Main nav ---------- */
.htg-nav {
	border-top: 1px solid var(--htg-line-dark);
}
.htg-nav .wp-block-navigation .wp-block-navigation-item__content {
	display: block;
	padding: 16px 14px 13px;
	border-bottom: 3px solid transparent;
	color: var(--wp--preset--color--mist);
}
.htg-nav .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--htg-gold);
}
.home .htg-nav .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item:first-child > .wp-block-navigation-item__content,
.htg-nav .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--cream);
	border-bottom-color: var(--htg-crimson);
}
.htg-nav .wp-block-navigation .is-gold > .wp-block-navigation-item__content {
	color: var(--htg-gold);
}
.htg-nav .wp-block-navigation .is-gold-first {
	margin-left: 8px;
	padding-left: 8px;
	border-left: 1px solid var(--htg-line-dark);
}
.htg-nav .wp-block-navigation__responsive-container-open {
	color: var(--wp--preset--color--cream);
	padding: 12px 0;
}
.htg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding: 10px 0;
	font-size: 1.125rem;
}
.htg-nav .wp-block-navigation__responsive-container.is-menu-open .is-gold-first {
	margin-left: 0;
	padding-left: 0;
	border-left: 0;
}

/* ---------- Latest-post ticker ---------- */
.htg-ticker {
	font-family: var(--htg-condensed);
	font-weight: 500;
	font-size: 0.9375rem;
	letter-spacing: 0.02em;
	overflow: hidden;
}
.htg-ticker-label {
	flex: none;
	margin: 0;
	padding: 10px 14px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.htg-ticker .wp-block-query {
	min-width: 0;
	flex: 1;
}
.htg-ticker .wp-block-post-template {
	display: flex;
	flex-wrap: nowrap;
	gap: 28px;
	overflow-x: auto;
	white-space: nowrap;
	margin: 0;
	padding: 0;
	scrollbar-width: thin;
}
.htg-ticker .wp-block-post-template > li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	flex: none;
}
.htg-ticker .wp-block-post-template > li::before {
	content: "★";
	font-size: 0.8em;
}
.htg-ticker .wp-block-post-title {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: 1.2;
	margin: 0;
	padding: 10px 0;
}
.htg-ticker .wp-block-post-title a:hover {
	color: inherit;
	text-decoration: underline;
}

/* ---------- Cards ---------- */
.htg-card {
	border: 1px solid var(--htg-line-dark);
	border-radius: 10px;
	overflow: hidden;
}
.htg-card-light {
	border: 1px solid var(--htg-line-light);
	border-radius: 8px;
	overflow: hidden;
}
.htg-card .wp-block-post-featured-image,
.htg-card-light .wp-block-post-featured-image {
	margin: 0;
}
.wp-block-post-featured-image img {
	object-fit: cover;
}
.htg-hero-image {
	position: relative;
	background: repeating-linear-gradient(135deg, #251C38 0 12px, #1E1730 12px 24px);
}
.htg-badge {
	display: inline-block;
	align-self: flex-start;
	margin: 0;
	padding: 4px 10px;
	border-radius: 3px;
	font-family: var(--htg-condensed);
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.3;
}

/* Category chips on the hero story. */
.htg-chips-terms a {
	display: inline-block;
	padding: 4px 9px;
	margin: 0 6px 6px 0;
	border: 1px solid #45395E;
	border-radius: 3px;
	color: var(--htg-gold) !important;
}
.htg-chips-terms .wp-block-post-terms__separator {
	display: none;
}

/* Read-more link styled as a button. */
.htg-readmore.wp-block-read-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 22px;
	border-radius: 6px;
	background: var(--htg-crimson);
	color: #fff !important;
	font-family: var(--htg-condensed);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
}
.htg-readmore.wp-block-read-more::after {
	content: "→";
}
.htg-readmore.wp-block-read-more:hover {
	background: var(--wp--preset--color--burgundy);
}

/* ---------- Headlines rail (numbered) ---------- */
.htg-rail-head {
	margin: 0;
	padding: 15px 22px 12px;
	border-bottom: 3px solid var(--htg-crimson);
}
.htg-rail .wp-block-post-template {
	counter-reset: htg-rail;
	margin: 0;
	padding: 8px 0;
}
.htg-rail .wp-block-post-template > li {
	counter-increment: htg-rail;
	display: flex;
	gap: 16px;
	margin: 0;
	padding: 16px 22px;
	border-bottom: 1px solid var(--htg-line-dark);
}
.htg-rail .wp-block-post-template > li::before {
	content: counter(htg-rail, decimal-leading-zero);
	flex: none;
	width: 50px;
	white-space: nowrap;
	font-family: var(--htg-display);
	font-style: italic;
	font-size: 2.5rem;
	line-height: 0.95;
	color: #5C4E78;
}
.htg-rail .wp-block-post-title {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: 1.0625rem;
	line-height: 1.32;
	letter-spacing: 0;
}
.htg-rail-more {
	margin: 0;
	text-align: center;
}
.htg-rail-more a {
	display: block;
	padding: 15px;
	border-top: 1px solid var(--htg-line-dark);
	color: var(--htg-gold) !important;
}

/* ---------- Band hub tiles ---------- */
.htg-tile {
	position: relative;
	border: 1px solid #33284A;
	border-radius: 8px;
	min-height: 112px;
	transition: border-color 0.15s ease;
}
.htg-tile:hover {
	border-color: var(--htg-gold);
}
.htg-tile h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.htg-tile .htg-tile-more {
	margin-top: auto;
}

/* ---------- Section heads with a rule ---------- */
.htg-section-head::after {
	content: "";
	order: 1;
	flex: 1 1 24px;
	height: 3px;
	background: currentColor;
	min-width: 24px;
}
.htg-section-head > * {
	margin: 0;
}
.htg-section-head > .htg-section-label {
	order: 2;
}

/* ---------- Rankings / poll cards ---------- */
.htg-poll-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.htg-poll-card > .wp-block-group:last-child {
	flex: 1;
}
.htg-poll-card .wp-block-post-featured-image {
	background: repeating-linear-gradient(135deg, #E8DCC6 0 12px, #E1D3BA 12px 24px);
}
.htg-push-bottom {
	margin-top: auto !important;
}

/* ---------- Legendary 5ths feature ---------- */
.htg-fifths {
	border-radius: 10px;
	overflow: hidden;
}
.htg-fifths .wp-block-columns {
	margin: 0;
}
.htg-fifths .wp-block-post-featured-image {
	height: 100%;
	min-height: 300px;
	margin: 0;
	background: repeating-linear-gradient(135deg, #251C38 0 12px, #1E1730 12px 24px);
}
.htg-fifths .wp-block-post-featured-image img {
	height: 100%;
}
.htg-fifths-latest {
	border: 1px solid #3A2F52;
	border-radius: 6px;
}

/* Gold outline button. */
.wp-block-button.is-style-outline.htg-btn-gold > .wp-block-button__link {
	border: 2px solid var(--htg-gold);
	color: var(--htg-gold);
	background: transparent;
}
.wp-block-button.is-style-outline.htg-btn-gold > .wp-block-button__link:hover {
	background: var(--htg-gold);
	color: var(--htg-ink);
}
.wp-block-button.is-style-outline.htg-btn-light > .wp-block-button__link {
	border: 2px solid #fff;
	color: #fff;
	background: transparent;
}
.wp-block-button.is-style-outline.htg-btn-light > .wp-block-button__link:hover {
	background: #fff;
	color: var(--htg-crimson);
}
.wp-block-button.htg-btn-dark > .wp-block-button__link {
	background: var(--htg-ink);
	color: var(--wp--preset--color--cream);
}
.wp-block-button.htg-btn-dark > .wp-block-button__link:hover {
	background: #000;
	color: var(--htg-gold);
}

/* ---------- Story feed ---------- */
.htg-feed .wp-block-post-template > li {
	margin: 0;
	padding: 22px 0;
	border-top: 1px solid var(--htg-line-light);
}
.htg-datebadge {
	flex: none;
	width: 76px;
	height: 86px;
	border-radius: 6px;
	text-align: center;
}
.htg-datebadge .wp-block-post-date {
	margin: 0;
	line-height: 1;
}
.htg-datebadge .htg-mon {
	font-family: var(--htg-condensed);
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--htg-gold);
}
.htg-datebadge .htg-day {
	font-family: var(--htg-display);
	font-size: 2.25rem;
}
.htg-datebadge .htg-yr {
	font-family: var(--htg-condensed);
	font-weight: 500;
	font-size: 0.75rem;
	color: var(--wp--preset--color--haze);
}
.htg-feed-body {
	min-width: 0;
	flex: 1;
}
.htg-feed .wp-block-query-pagination {
	padding-top: 22px;
	border-top: 1px solid var(--htg-line-light);
}
.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 46px;
	height: 46px;
	margin-right: 6px;
	border: 2px solid var(--wp--preset--color--charcoal);
	border-radius: 50%;
	color: var(--wp--preset--color--charcoal);
	text-decoration: none;
}
.wp-block-query-pagination-numbers .page-numbers.current {
	background: var(--htg-ink);
	border-color: var(--htg-ink);
	color: var(--htg-gold);
}
.wp-block-query-pagination-numbers .page-numbers.dots {
	border: 0;
	min-width: 20px;
}
.wp-block-query-pagination-next,
.wp-block-query-pagination-previous {
	display: inline-flex;
	align-items: center;
	height: 46px;
	padding: 0 20px;
	border: 2px solid var(--wp--preset--color--charcoal);
	border-radius: 23px;
	color: var(--wp--preset--color--charcoal);
	text-decoration: none;
}

/* ---------- Sidebar ---------- */
.htg-side-title {
	padding-bottom: 8px;
	border-bottom: 3px solid var(--wp--preset--color--charcoal);
}
.htg-dir-head {
	border-bottom: 3px solid var(--htg-crimson);
}
.htg-catlist.wp-block-categories,
.htg-chips.wp-block-archives,
.htg-comments.wp-block-latest-comments {
	list-style: none;
	margin: 0;
	padding: 0;
}
.htg-catlist li a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid var(--htg-line-light);
	color: var(--wp--preset--color--charcoal);
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
}
.htg-catlist li a::after {
	content: "›";
	color: var(--wp--preset--color--burgundy);
}
.htg-catlist li a:hover {
	color: var(--wp--preset--color--burgundy);
}
.htg-chips.wp-block-archives {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.htg-chips li a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid #CDBDA3;
	border-radius: 4px;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--charcoal);
	font-family: var(--htg-condensed);
	font-weight: 500;
	font-size: 0.9375rem;
	letter-spacing: 0.04em;
	text-decoration: none;
}
.htg-chips li a:hover {
	border-color: var(--wp--preset--color--burgundy);
	color: var(--wp--preset--color--burgundy);
}
.htg-comments .wp-block-latest-comments__comment {
	margin: 0;
	padding: 11px 0;
	border-bottom: 1px solid #E7DCCB;
	font-size: 0.9375rem;
	line-height: 1.45;
}
.htg-comments article {
	margin: 0;
}
.htg-comments .wp-block-latest-comments__comment-meta {
	margin: 0;
}
.htg-comments .wp-block-latest-comments__comment-link {
	font-weight: 600;
}
.htg-comments .wp-block-latest-comments__comment-author {
	font-weight: 700;
	color: var(--wp--preset--color--charcoal);
	text-decoration: none;
}

/* ---------- Pageantry band ---------- */
.htg-pageantry {
	position: relative;
	overflow: hidden;
	background-image: url(assets/images/star.svg);
	background-repeat: no-repeat;
	background-size: 420px 420px;
	background-position: right -60px top -40px;
}

/* ---------- You Missed ---------- */
.htg-missed-card {
	height: 100%;
	border: 1px solid var(--htg-line-dark);
	border-top: 3px solid var(--htg-gold);
	border-radius: 6px;
}
.htg-missed .wp-block-post-title {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: 1.0625rem;
	line-height: 1.3;
	letter-spacing: 0;
}

/* ---------- Footer ---------- */
.htg-footer-nav .wp-block-navigation-item__content {
	padding: 8px 0;
	font-weight: 500;
	font-size: 0.9375rem;
}

/* ---------- Single posts and pages ---------- */
.htg-titleband .wp-block-post-terms a {
	color: var(--htg-gold) !important;
}
.htg-article .wp-block-post-content > * + * {
	margin-block-start: 1.25em;
}
.htg-article .wp-block-post-content a {
	text-decoration: underline;
	text-underline-offset: 2px;
}
.htg-article .wp-block-post-content img {
	border-radius: 6px;
	height: auto;
}
.wp-block-post-comments-form input:not([type="submit"]),
.wp-block-post-comments-form textarea {
	border: 1px solid #C9B791;
	border-radius: 6px;
	background: #fff;
	padding: 10px 12px;
}

/* ---------- Accessibility ---------- */
:where(a, button, input, .wp-element-button):focus-visible {
	outline: 3px solid var(--htg-gold);
	outline-offset: 2px;
}

/* ---------- Phones ---------- */
@media (max-width: 781px) {
	.htg-masthead .wp-block-search {
		flex: 1 1 100%;
	}
	.htg-hero-image,
	.htg-hero-image img {
		height: 260px !important;
	}
	.htg-datebadge {
		width: 62px;
		height: 74px;
	}
	.htg-datebadge .htg-day {
		font-size: 1.875rem;
	}
	.htg-pageantry {
		background-size: 260px 260px;
	}
}

/* Header, main and footer sit flush against each other. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}
.wp-block-post-terms a {
	text-decoration: none;
}
.wp-block-post-terms a:hover {
	text-decoration: underline;
}

.comment-form-cookies-consent {
	display: flex;
	gap: 8px;
	align-items: flex-start;
}
.comment-form-cookies-consent input {
	margin-top: 0.35em;
}
:where(.editor-styles-wrapper) .is-root-container > :is(.wp-block-template-part, main, .wp-block-group.alignfull) + :is(.wp-block-template-part, main, .wp-block-group.alignfull) {
	margin-block-start: 0;
}
