/* Hallmark · macrostructure: Marquee Hero · tone: austere, technical · anchor hue: yellow ~10% on black/white bands
 * nav: core navigation + Join button (N1 variant) · footer: Ft5 Statement · genre: editorial
 * theme: studied-DNA (source: url, https://iida.org/ public reference) · paper white / obsidian bands · accent yellow #FCD116 (brand token)
 * display: Barlow Condensed 700 uppercase (TrumpGothicPro stand-in) · body: Switzer · label: JetBrains Mono · studied: yes · DNA-source: url
 * pre-emit critique: P4 H4 E3 S3 R4 V4 (E3: not rendered, responsive widths unverified)
 * MASIG global styles. Fonts are enqueued in functions.php (no @import here). */

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

html {
	scroll-behavior: smooth;
	overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	* {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

body {
	font: 400 16px/1.6 var(--wp--preset--font-family--switzer);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

img,
video,
iframe {
	max-width: 100%;
	height: auto;
}

/* ---------- Typography ---------- */
h1 {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	line-height: 0.95;
}

h2,
h3,
h4,
h5,
h6 {
	font-family: var(--wp--preset--font-family--switzer);
	letter-spacing: -0.01em;
}

h1,
h2,
h3 {
	overflow-wrap: anywhere;
	min-width: 0;
}

code,
kbd,
pre,
samp,
.is-mono {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
}

/* ---------- Links ---------- */
/* Blue #2080C0 on white is 4.3:1 (fails AA for text), so text links are ink + underline. */
a {
	color: var(--wp--preset--color--obsidian);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
	text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--wp--preset--color--masig-blue);
	outline-offset: 3px;
}

.masig-section--dark a:focus-visible,
.masig-section--dark button:focus-visible,
.masig-hero a:focus-visible {
	outline-color: var(--wp--preset--color--yellow);
}

.masig-section--dark a {
	color: var(--wp--preset--color--white);
}

.wp-block-navigation a,
.wp-block-post-title a,
.wp-block-site-title a,
.wp-block-button__link {
	color: inherit;
	text-decoration: none;
}

/* ---------- Buttons ---------- */
/* States: default, hover, :focus-visible (global), :active, disabled n/a (links). */
a.btn-primary,
a.btn-outline,
a.btn-ghost,
.btn-primary > .wp-block-button__link,
.btn-outline > .wp-block-button__link,
.btn-ghost > .wp-block-button__link {
	display: inline-block;
	font-family: var(--wp--preset--font-family--switzer);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	border-radius: 0;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

a.btn-primary,
.btn-primary > .wp-block-button__link {
	padding: 14px 32px;
	background: var(--wp--preset--color--obsidian);
	color: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--obsidian);
}

a.btn-primary:hover,
.btn-primary > .wp-block-button__link:hover {
	background: var(--wp--preset--color--yellow);
	border-color: var(--wp--preset--color--obsidian);
	color: var(--wp--preset--color--obsidian);
	text-decoration: none;
}

a.btn-primary:active,
.btn-primary > .wp-block-button__link:active {
	transform: translateY(1px);
}

a.btn-outline,
.btn-outline > .wp-block-button__link {
	padding: 14px 32px;
	background: transparent;
	color: var(--wp--preset--color--obsidian);
	border: 2px solid var(--wp--preset--color--obsidian);
}

a.btn-outline:hover,
.btn-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--obsidian);
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

a.btn-ghost,
.btn-ghost > .wp-block-button__link {
	padding: 12px 0;
	background: transparent;
	color: var(--wp--preset--color--obsidian);
	border: 0;
}

a.btn-ghost::after,
.btn-ghost > .wp-block-button__link::after {
	content: "\2192";
	display: inline-block;
	margin-left: 0.5em;
	transition: transform 0.2s;
}

a.btn-ghost:hover,
.btn-ghost > .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--obsidian);
	text-decoration: underline;
}

a.btn-ghost:hover::after,
.btn-ghost > .wp-block-button__link:hover::after {
	transform: translateX(4px);
}

/* Buttons on dark bands: yellow fill, ink text */
.masig-section--dark .btn-primary > .wp-block-button__link {
	background: var(--wp--preset--color--yellow);
	border-color: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--obsidian);
}

.masig-section--dark .btn-primary > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--obsidian);
}

/* Button on yellow band: ink fill, hover inverts to white */
.masig-section--yellow .btn-primary > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--obsidian);
	color: var(--wp--preset--color--obsidian);
}

/* ---------- Sticky header ---------- */
.wp-block-template-part:has(> .site-header) {
	display: contents;
}

.site-header {
	position: sticky;
	top: 0;
	background: var(--wp--preset--color--white);
	border-bottom: 2px solid var(--wp--preset--color--obsidian);
	z-index: 100;
	transition: box-shadow 0.2s;
}

.site-header.is-scrolled {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

.site-header__inner {
	min-height: var(--wp--custom--header-height, 72px);
	align-items: center;
}

.site-header .wp-block-site-logo img {
	display: block;
	height: auto;
}

/* Nav voice: condensed uppercase, matches the display face */
.site-header .wp-block-navigation {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700;
	font-size: 1.125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.site-header .wp-block-navigation-item__content {
	white-space: nowrap;
}

.site-header .wp-block-navigation-item:not(.masig-nav-join) .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
	text-decoration-thickness: 2px;
}

.masig-nav-join .wp-block-navigation-item__content {
	padding: 8px 20px;
	background: var(--wp--preset--color--obsidian);
	color: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--obsidian);
	transition: background-color 0.2s, color 0.2s;
}

.masig-nav-join .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--obsidian);
	text-decoration: none;
}

body.masig-nav-open {
	overflow: hidden;
}

/* ---------- Sections / bands ---------- */
.masig-section {
	padding-top: 96px;
	padding-bottom: 96px;
}

.masig-section--dark {
	background: var(--wp--preset--color--obsidian);
	color: var(--wp--preset--color--white);
}

.masig-band--tint {
	background: var(--wp--preset--color--off-white);
}

/* News band is hidden until at least one post exists. */
.masig-news:not(:has(.wp-block-post)) {
	display: none;
}

.masig-band__title {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700;
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	line-height: 0.95;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	margin-top: 0;
	margin-bottom: 48px;
}

.masig-band__title--xl {
	font-size: clamp(3rem, 9vw, 7.5rem);
	line-height: 0.9;
	max-width: 16ch;
}

.masig-band__lede {
	max-width: 52ch;
	font-size: var(--wp--preset--font-size--large);
}

/* ---------- Hero (Marquee) ---------- */
.masig-hero {
	padding-left: var(--wp--style--root-padding-left, 24px);
	padding-right: var(--wp--style--root-padding-right, 24px);
	padding-bottom: 48px;
}

.masig-hero .wp-block-cover__inner-container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
}

.masig-hero .wp-block-heading {
	max-width: 100%;
	margin-block: 0 32px;
	font-size: clamp(3rem, 9.5vw, 8.5rem);
	line-height: 0.88;
}

.masig-hero__tag {
	margin: 0;
	max-width: none;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ---------- Index rows (events) ---------- */
.masig-row {
	display: grid;
	grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr) minmax(0, 16rem) auto;
	column-gap: 32px;
	align-items: baseline;
	padding-block: 28px;
	border-top: 2px solid var(--wp--preset--color--obsidian);
}

.masig-row:last-child {
	border-bottom: 2px solid var(--wp--preset--color--obsidian);
}

.masig-row > * {
	margin: 0;
	min-width: 0;
}

.masig-row__title {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700;
	font-size: clamp(2rem, 4.5vw, 3.5rem);
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

.masig-row__date {
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ---------- Post grid ---------- */
.wp-block-post-template.is-layout-grid {
	gap: 48px 32px;
}

.wp-block-post-template .wp-block-post-featured-image {
	margin-bottom: 16px;
}

.wp-block-post-template .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	object-fit: cover;
}

.wp-block-post-template .wp-block-post-title {
	margin-block: 8px;
}

.wp-block-post-template .wp-block-post-excerpt__excerpt {
	margin-top: 0;
}

/* ---------- Footer (Ft5 statement) ---------- */
.site-footer {
	border-top: 2px solid var(--wp--preset--color--obsidian);
}

.site-footer__statement {
	font-weight: 700;
	font-size: clamp(2.5rem, 8vw, 6.5rem);
	line-height: 0.9;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	margin: 0 0 56px;
	overflow-wrap: anywhere;
}

.masig-columns {
	gap: 48px;
}

.site-footer .wp-block-navigation a,
.site-footer .footer-links a {
	text-decoration: none;
}

.site-footer .wp-block-navigation a:hover,
.site-footer .footer-links a:hover {
	text-decoration: underline;
}

.site-footer .footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer .footer-links li + li {
	margin-top: 8px;
}

.site-footer__bar {
	border-top: 1px solid var(--wp--preset--color--mid-grey);
}

.site-footer__heading {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-top: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.masig-row {
		grid-template-columns: minmax(8rem, 10rem) minmax(0, 1fr);
		row-gap: 8px;
	}
	.masig-row__title {
		grid-column: 2;
	}
	.masig-row__place,
	.masig-row__link {
		grid-column: 2;
	}
	.masig-row__date {
		grid-column: 1;
		grid-row: 1;
	}
}

@media (max-width: 781px) {
	.masig-section {
		padding-top: 64px;
		padding-bottom: 64px;
	}
	.masig-columns {
		gap: 32px;
	}
	.masig-row {
		grid-template-columns: minmax(0, 1fr);
	}
	.masig-row__date,
	.masig-row__title,
	.masig-row__place,
	.masig-row__link {
		grid-column: 1;
		grid-row: auto;
	}
	.masig-hero {
		padding-bottom: 32px;
	}
}
