/*
Theme Name:   Women 4 STEM 2026
Description:  Women 4 STEM 2026 brand implementation (EPIC Social guidelines, Sep 2026). Child theme.
Template:     twentytwentyfour
Version:      0.1.6
Requires at least: 6.6
Text Domain:  w4s-2026
*/

/*
 * Most styling lives in theme.json. This file holds only what theme.json
 * can't express: focus rings, brand bars and program context.
 */

/* ---------- Focus ----------
 * Double ring: black outline + white halo. Stays visible on white, black and
 * all five primaries, so one rule covers every background (WCAG 2.4.7 / 2.4.13).
 */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px #fff;
}
:where(.has-black-background-color) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: #fff;
	box-shadow: 0 0 0 4px #000;
}

/* ---------- Links ----------
 * Underlined by default so links never rely on colour alone (WCAG 1.4.1).
 */
:where(.wp-block-post-content, .entry-content) a:where(:not(.wp-element-button)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}
:where(.wp-block-post-content, .entry-content) a:where(:not(.wp-element-button)):hover {
	text-decoration-thickness: 2px;
}

/* ---------- Program context ----------
 * Set by the Group block styles registered in functions.php
 * ("Program: Go Girl", etc.). Anything inside reads var(--w4s-program).
 */
.is-style-program-iow        { --w4s-program: var(--wp--custom--program--iow); }
.is-style-program-grad-girls { --w4s-program: var(--wp--custom--program--grad-girls); }
.is-style-program-mentorshe  { --w4s-program: var(--wp--custom--program--mentorshe); }
.is-style-program-go-girl    { --w4s-program: var(--wp--custom--program--go-girl); }
.is-style-program-whats-hot  { --w4s-program: var(--wp--custom--program--whats-hot); }

/* ---------- Brand bars (Separator block styles) ----------
 * Decorative graphic device (guidelines p20). Order follows the master logo.
 */
.wp-block-separator.is-style-w4s-bar,
.wp-block-separator.is-style-program-bar {
	border: none;
	opacity: 1;
	height: 0.5rem;
	width: min(12rem, 100%);
	margin-left: 0;
}
.wp-block-separator.is-style-w4s-bar {
	background: linear-gradient(
		to right,
		var(--wp--preset--color--tangerine) 0 20%,
		var(--wp--preset--color--jade) 20% 40%,
		var(--wp--preset--color--magenta) 40% 60%,
		var(--wp--preset--color--sky) 60% 80%,
		var(--wp--preset--color--scarlet) 80% 100%
	);
}
.wp-block-separator.is-style-program-bar {
	/* Falls back to black outside a program context, so a misplaced bar is visible, not invisible. */
	background: var(--w4s-program, var(--wp--preset--color--black));
}
.has-text-align-center + .wp-block-separator.is-style-w4s-bar,
.has-text-align-center + .wp-block-separator.is-style-program-bar {
	margin-left: auto;
	margin-right: auto;
}

/* ---------- Logo ----------
 * Guidelines p6: never below 150px wide on screen.
 */
.wp-block-site-logo img {
	min-width: 150px;
}

/* ---------- Header logo ----------
 * Reversed logo from the theme (assets/images, 2x PNG). Never below 150px wide (guidelines p6);
 * scales between 150px and 280px with the viewport. !important beats the image block's inline width.
 */
.wp-block-image.w4s-logo { margin: 0; line-height: 0; }
/* Core makes the link inline-block, which sits on a text baseline and leaves descender space under the logo. */
.wp-block-image.w4s-logo a { display: block; }
.w4s-logo img { width: clamp(150px, 40vw, 280px) !important; height: auto; display: block; }
