/*
 * Only what theme.json cannot express.
 * Everything visual that can be a token is a token, so style variations work.
 */

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-contrast);
}

/* Keyboard focus must be obvious and must not depend on the palette's contrast. */
a:focus-visible,
button:focus-visible,
.wp-element-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: var(--wp--custom--radius--sm, 4px);
}

/* Post cards. In a query loop each post is an <li>, so this targets the card
   group without needing a class in every template. */
@media (hover: hover) and (pointer: fine) {
	.wp-block-post-template > li > .wp-block-group {
		transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
	}
	.wp-block-post-template > li > .wp-block-group:hover {
		transform: translateY(-2px);
		box-shadow: 0 12px 34px -14px rgb(0 0 0 / 0.22);
		border-color: var(--wp--preset--color--accent) !important;
	}
}

/* A quiet underline that reads as the club's green without shouting. */
.wp-block-navigation-item__content {
	text-decoration: none;
	text-underline-offset: 0.35em;
	text-decoration-thickness: 2px;
}
.wp-block-navigation-item__content:hover,
.wp-block-navigation-item__content:focus {
	color: var(--wp--preset--color--accent-deep);
	text-decoration: underline;
}

/* Hero heading: keep the accent span from breaking the line rhythm. */
.wp-block-heading span[style*="--wp--preset--color--accent"] {
	white-space: nowrap;
}

/* Long-form content a little more readable than the default. */
.entry-content > * + *,
.wp-block-post-content > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

html {
	scroll-behavior: smooth;
}

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

@media print {
	.wp-block-template-part[data-area="header"],
	.wp-block-template-part[data-area="footer"] { display: none !important; }
}
