/*
Theme Name: BioWave 2026
Theme URI: https://biowaveregeneration.com
Author: BioWave Regeneration
Description: Block theme for BioWave Regeneration, moved off the Hostinger
builder onto WordPress. Content lives in post_content and is edited through the
block editor, WP-CLI, or the REST API — never in template files.
Version: 1.1
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: biowave-2026
Tags: block-theme, one-column, custom-colors, custom-logo, wide-blocks
*/

/*
 * Everything visual is in theme.json. This file only carries what theme.json
 * cannot express.
 */

/* The medical disclaimer. Legible, never hidden — a disclosure a patient cannot
   read is not a disclosure. */
.bw-disclaimer {
	border-left: 4px solid var(--wp--preset--color--accent);
	background: var(--wp--preset--color--mist);
	padding: 0.9rem 1.1rem;
	margin: 1.5rem 0;
	font-size: 0.95rem;
	color: var(--wp--preset--color--ink);
}

.bw-disclaimer em {
	font-style: normal;
}

/* Tap-to-call. This is the primary conversion path on this site, not a
   secondary one: the visitor is often in their sixties or seventies, often in
   pain, and will pick up a phone long before they will fill in a form. It is
   sized as a real target rather than a text link, and it stays visible in the
   header on a phone even when the rest of the nav collapses into the menu. */
.bw-call .wp-block-button__link {
	white-space: nowrap;
}

.bw-footer-call a {
	font-weight: 700;
	text-decoration: none;
	display: inline-block;
	min-height: 44px;
	line-height: 44px;
}

@media (max-width: 600px) {
	.bw-footer-call {
		text-align: center;
	}
}

/* Skip link — keyboard users land on content, not on the nav every time. */
.skip-link:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 999999;
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--brand);
	color: #fff;
	border-radius: 4px;
}

/* bw:rotator:start */
/* GENERATED by scripts/build_rotator.py — edit content/_rotator_phrases.json, not this.
 * 14 phrases x 2s each = a 28s cycle.
 */
.bw-rotator {
	position: relative;
	/* The phrases are absolutely positioned and have no natural height. Without
	 * this the block collapses and the page jumps as it loads. */
	min-height: 1.4em;
	margin: 0 0 1rem;
	font-size: clamp(1.75rem, 6vw, 3.125rem);
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

.bw-rotator-phrase {
	position: absolute;
	inset: 0;
	opacity: 0;
	animation: bw-rotate 28s linear infinite;
}

@keyframes bw-rotate {
	0%      { opacity: 0; transform: translateY(0.3em); }
	1.286%  { opacity: 1; transform: translateY(0); }
	5.786%  { opacity: 1; transform: translateY(0); }
	7.143%  { opacity: 0; transform: translateY(-0.3em); }
	100%    { opacity: 0; transform: translateY(-0.3em); }
}

/* Motion nobody can stop is a problem for a visitor who gets motion sickness, and
 * this page is read by people already managing a nerve condition. For them the
 * first phrase simply stays put. */
@media (prefers-reduced-motion: reduce) {
	.bw-rotator-phrase { animation: none; }
	.bw-rotator-phrase:first-child { opacity: 1; }
}
/* bw:rotator:end */

/* bw:testimonials:start */
/* GENERATED by scripts/build_testimonials.py — do not edit here. */
.bw-testimonials {
	margin: 2.5rem 0;
}

.bw-testimonial-rating {
	font-weight: 600;
	margin: 0 0 1.25rem;
}

.bw-testimonial {
	margin: 0 0 1.5rem;
	padding: 1.25rem 1.5rem;
	border-left: 4px solid currentColor;
	background: rgba(0, 0, 0, 0.03);
}

.bw-testimonial blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	/* Long reviews are the useful ones. Nerve-pain patients read on phones and
	 * many of them have diabetic eye disease, so this does not shrink. */
	font-size: 1.0625rem;
	line-height: 1.65;
}

.bw-testimonial blockquote p + p {
	margin-top: 0.75rem;
}

.bw-testimonial figcaption {
	margin-top: 0.75rem;
	font-weight: 600;
}

.bw-testimonial-meta {
	display: block;
	font-weight: 400;
	opacity: 0.7;
	font-size: 0.9375rem;
}

/* Not fine print. The FTC's whole objection to testimonials is that the
 * qualifier is set smaller than the claim it qualifies. */
.bw-testimonial-note {
	font-size: 0.9375rem;
	margin: 1rem 0 0;
}

@media (min-width: 48rem) {
	.bw-testimonials {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
		gap: 1.5rem;
	}

	.bw-testimonial-rating,
	.bw-testimonial-note {
		grid-column: 1 / -1;
	}

	.bw-testimonial {
		margin: 0;
	}
}
/* bw:testimonials:end */
