/*
Theme Name: The Speech Guy
Theme URI: https://www.thespeechguy.com.au/
Author: The Speech Guy & Co.
Description: Child theme of Twenty Twenty-Five for The Speech Guy & Co. Built around
             aphasia-friendly reading guidance: high contrast, large type, short lines,
             sentence case, no text over imagery, and no motion that is not user-triggered.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thespeechguy
*/

/* ---------------------------------------------------------------------------
   Everything below is accessibility floor, not decoration. Read the comments
   before removing anything.
   --------------------------------------------------------------------------- */

/* Visible keyboard focus. The default block theme ring disappears against
   coloured bands, so this is drawn as a solid offset ring in both directions. */
:where(a, button, input, select, textarea, summary, .wp-block-button__link):focus-visible {
	outline: 3px solid var(--wp--preset--color--ember);
	outline-offset: 3px;
	border-radius: 2px;
}

.has-deep-blue-background-color :where(a, button, .wp-block-button__link):focus-visible,
.has-ink-background-color :where(a, button, .wp-block-button__link):focus-visible {
	outline-color: #ffffff;
}

/* Skip link needs to be reachable and readable, not a 10px grey afterthought. */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--deep-blue);
	color: #ffffff;
	font-size: 1.125rem;
	padding: 1rem 1.5rem;
	z-index: 100000;
}

/* Body links carry an underline at all times. Colour alone is not a signal, and
   readers with acquired brain injury lose hover affordances entirely on touch. */
.wp-block-post-content a:where(:not(.wp-element-button)),
.wp-block-paragraph a:where(:not(.wp-element-button)),
.wp-block-list a:where(:not(.wp-element-button)) {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 0.08em;
}

/* Italics are measurably harder to read with aphasia and low vision. The old
   site used them for the funding notes and the leave notice. Convert emphasis
   to weight instead of slant. */
.wp-block-post-content :where(em, i),
.wp-block-group :where(em, i) {
	font-style: normal;
	font-weight: 700;
}

/* Tap targets. 48px is the floor for a hand that shakes. */
.wp-block-button__link,
.wp-block-navigation__content a,
.wp-block-social-link a {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* The phone number is the highest-value action on the site for a carer
   standing in a hospital corridor. It gets to be big. */
.tsg-phone a {
	display: inline-block;
	font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
	font-weight: 800;
	letter-spacing: 0.01em;
	text-decoration: none;
	line-height: 1.2;
}

.tsg-phone a:hover,
.tsg-phone a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Section bands separate content structurally rather than by whitespace alone,
   so a reader with reduced processing speed can see where one idea ends. */
.tsg-band {
	border-block-start: 1px solid rgba(22, 32, 43, 0.12);
}

.tsg-band.has-deep-blue-background-color,
.tsg-band.has-ink-background-color {
	border-block-start-color: transparent;
}

/* Service and audience rows: a rule between items, not a grid of identical
   rounded cards. Keeps one idea per line at every viewport. */
.tsg-rows .wp-block-column {
	padding-block: var(--wp--preset--spacing--30);
}

@media (min-width: 782px) {
	.tsg-rows .wp-block-column + .wp-block-column {
		border-inline-start: 1px solid rgba(22, 32, 43, 0.12);
		padding-inline-start: var(--wp--preset--spacing--40);
	}
}

@media (max-width: 781px) {
	.tsg-rows .wp-block-column + .wp-block-column {
		border-block-start: 1px solid rgba(22, 32, 43, 0.12);
	}
}

/* Header stays compact on small screens. The old site's sticky header ate a
   quarter of the viewport on every scroll. */
@media (max-width: 781px) {
	.wp-block-site-logo img {
		max-width: 190px;
		height: auto;
	}
}

/* Respect the OS setting. There is no decorative motion in this theme, but
   parent-theme and plugin transitions still need muting. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Print: referrers do still print these pages for paper files. */
@media print {
	.wp-block-navigation,
	.wp-block-social-links,
	.tsg-no-print {
		display: none !important;
	}

	body {
		font-size: 12pt;
		color: #000;
	}
}
