/*
Theme Name: Sacred Circle Justice Services
Theme URI: https://sacred-circle-justice.ca
Description: Brand theme for Sacred Circle Justice Services. A child theme of Twenty Twenty-Five carrying the SCJS colour palette, typography and design elements. First Nations owned and operated.
Author: Sacred Circle Justice Services
Version: 1.0.3
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Template: twentytwentyfive
Text Domain: sacred-circle
*/

/* ---------------------------------------------------------------------------
   Nearly all design decisions live in theme.json, not here.
   To change a colour or font, edit theme.json OR use
   Appearance -> Editor -> Styles in the WordPress dashboard.

   This file holds only the few things theme.json cannot express.
   --------------------------------------------------------------------------- */


/* --- Beadwork band -------------------------------------------------------
   The gold-and-black diamond band from the style guide, drawn in pure CSS
   so there is no image to maintain. Apply it by adding a Separator block
   and choosing the "Beadwork band" style in the block sidebar.
   -------------------------------------------------------------------------- */

.wp-block-separator.is-style-beadwork {
	border: none;
	height: 18px;
	max-width: none;
	width: 100%;
	margin-left: 0;
	margin-right: 0;
	opacity: 1;
	background-color: var(--wp--preset--color--black);
	background-image:
		linear-gradient(135deg, var(--wp--preset--color--gold) 25%, transparent 25%),
		linear-gradient(225deg, var(--wp--preset--color--gold) 25%, transparent 25%),
		linear-gradient(315deg, var(--wp--preset--color--gold) 25%, transparent 25%),
		linear-gradient(45deg,  var(--wp--preset--color--gold) 25%, transparent 25%);
	background-size: 18px 18px;
	background-position: 0 0, 0 0, 9px 9px, 9px 9px;
}

/* A lighter version for use on the warm neutral background. */
.wp-block-separator.is-style-beadwork-light {
	border: none;
	height: 12px;
	max-width: none;
	width: 100%;
	margin-left: 0;
	margin-right: 0;
	opacity: 1;
	background-color: transparent;
	background-image:
		linear-gradient(135deg, var(--wp--preset--color--gold) 25%, transparent 25%),
		linear-gradient(225deg, var(--wp--preset--color--gold) 25%, transparent 25%);
	background-size: 12px 12px;
	background-position: 0 0, 0 0;
}


/* --- Eyebrow rule --------------------------------------------------------
   The short gold rule with a centred diamond used above section headings
   throughout the style guide.
   -------------------------------------------------------------------------- */

.wp-block-separator.is-style-diamond-rule {
	border: none;
	height: 9px;
	max-width: 220px;
	opacity: 1;
	background: none;
	position: relative;
}

.wp-block-separator.is-style-diamond-rule::before {
	content: "";
	position: absolute;
	top: 4px;
	left: 0;
	right: 0;
	height: 1px;
	background-color: var(--wp--preset--color--gold);
}

.wp-block-separator.is-style-diamond-rule::after {
	content: "";
	position: absolute;
	top: 1px;
	left: 50%;
	width: 7px;
	height: 7px;
	margin-left: -3.5px;
	background-color: var(--wp--preset--color--gold);
	transform: rotate(45deg);
}

/* --- Testimonial band -----------------------------------------------------
   Brand gold (#C6A15B) sits at roughly 2.2:1 on warm neutral, so it is used
   here only for the decorative quote mark and the rule — never for text.
   Anything readable uses gold-deep (#8A6825, 5.14:1) or black.
-------------------------------------------------------------------------- */

.scjs-testimonial-band {
	position: relative;
}

.scjs-testimonial-band > .wp-block-heading {
	letter-spacing: 0.09em;
	text-transform: uppercase;
	margin-block-end: var(--wp--preset--spacing--50);
}

/* --- The quote itself --- */

.scjs-testimonial-band .scjs-testimonial {
	position: relative;
	max-inline-size: 62ch;
	margin-inline: auto;
	padding: 0;
	border: 0;
	text-align: center;
}

/* Decorative opening quote mark. Uses the heading font so it matches the
   rest of the site's display type rather than the body face. */
.scjs-testimonial-band .scjs-testimonial::before {
	content: "\201C";
	display: block;
	font-family: var(--wp--preset--font-family--heading, Georgia, serif);
	font-size: clamp(3.5rem, 8vw, 5.5rem);
	line-height: 0.8;
	color: var(--wp--preset--color--gold);
	margin-block-end: 0.15em;
}

.scjs-testimonial-band .scjs-testimonial p {
	line-height: 1.65;
	margin-block-end: 1.1em;
	text-wrap: pretty;
}

/* --- Attribution --- */

.scjs-testimonial-band .scjs-testimonial cite {
	display: block;
	margin-block-start: var(--wp--preset--spacing--40);
	padding-block-start: var(--wp--preset--spacing--30);
	border-block-start: 1px solid var(--wp--preset--color--gold);
	max-inline-size: 24rem;
	margin-inline: auto;
	font-style: normal;
	font-size: 0.8125rem;
	line-height: 1.7;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-deep);
}


@media (max-width: 781px) {
	.scjs-testimonial-band .scjs-testimonial {
		text-align: start;
	}

	.scjs-testimonial-band .scjs-testimonial cite {
		margin-inline: 0;
	}
}


/* --- Service cards -------------------------------------------------------
   Give grouped service cards an even height and a quiet hover lift.
   -------------------------------------------------------------------------- */

.scjs-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-top: 3px solid var(--wp--preset--color--gold);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scjs-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

.scjs-card .wp-block-buttons {
	margin-top: auto;
}


/* --- Outline buttons -----------------------------------------------------
   Core's outline style borrows the button's background colour for its text,
   which would put the light brand gold on a white card. Use the deeper gold
   on light backgrounds, and the bright brand gold inside black sections.
   -------------------------------------------------------------------------- */

.wp-block-button.is-style-outline > .wp-element-button {
	color: var(--wp--preset--color--gold-deep);
	border-color: var(--wp--preset--color--gold-deep);
	background-color: transparent;
}

.wp-block-button.is-style-outline > .wp-element-button:hover,
.wp-block-button.is-style-outline > .wp-element-button:focus-visible {
	color: var(--wp--preset--color--white);
	background-color: var(--wp--preset--color--gold-deep);
}

.has-black-background-color .wp-block-button.is-style-outline > .wp-element-button {
	color: var(--wp--preset--color--gold);
	border-color: var(--wp--preset--color--gold);
}

.has-black-background-color .wp-block-button.is-style-outline > .wp-element-button:hover,
.has-black-background-color .wp-block-button.is-style-outline > .wp-element-button:focus-visible {
	color: var(--wp--preset--color--black);
	background-color: var(--wp--preset--color--gold);
}

/* --- Featured training strip ----------------------------------------------
   Append to style.css. Selectors are deliberately two levels deep so they
   outrank the :where() rules in theme.json that force white text inside
   .has-black-background-color sections.
-------------------------------------------------------------------------- */

.scjs-training-strip {
	position: relative;
	overflow: hidden;
	border-top: 1px solid rgba(198, 161, 91, 0.35);
	border-bottom: 1px solid rgba(198, 161, 91, 0.35);
}

/* Decorative dot field, behind the medallion */
.scjs-training-strip::after {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline-end: 0;
	inline-size: 170px;
	block-size: 130px;
	background-image: radial-gradient(var(--wp--preset--color--gold) 1px, transparent 1px);
	background-size: 11px 11px;
	opacity: 0.28;
	pointer-events: none;
}

/* --- "Now booking" corner flag --- */

.scjs-training-strip .scjs-training-flag {
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 0.45em;
	margin: 0;
	padding: 0.6rem 1.1rem 1.3rem;
	background-color: var(--wp--preset--color--gold);
	color: #000;
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}

.scjs-training-strip .scjs-training-flag svg {
	inline-size: 1em;
	block-size: 1em;
	flex: none;
}

/* --- Copy --- */

.scjs-training-strip .scjs-training-lede {
	color: var(--wp--preset--color--gold);
	font-weight: 600;
	max-inline-size: 34ch;
}

.scjs-training-strip .scjs-training-reach {
	color: var(--wp--preset--color--gold);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-block-start: var(--wp--preset--spacing--30);
}

/* --- Icon row --- */

.scjs-training-icons {
	display: flex;
	flex-wrap: wrap;
	row-gap: 1.25rem;
	margin: var(--wp--preset--spacing--40) 0 0;
	padding: 0;
	list-style: none;
}

.scjs-training-strip .scjs-training-icons li {
	flex: 1 1 7rem;
	min-inline-size: 6rem;
	padding-inline: 0.9rem;
	text-align: center;
	border-inline-start: 1px solid rgba(198, 161, 91, 0.35);
	color: var(--wp--preset--color--white);
	font-size: 0.6875rem;
	line-height: 1.35;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.scjs-training-strip .scjs-training-icons li:first-child {
	border-inline-start: 0;
	padding-inline-start: 0;
}

.scjs-training-strip .scjs-training-icons svg {
	display: block;
	inline-size: 34px;
	block-size: 34px;
	margin: 0 auto 0.55rem;
	color: var(--wp--preset--color--gold);
}

/* --- Medallion (stand-in for the photo) --- */

.scjs-training-medallion {
	inline-size: 100%;
	max-inline-size: 320px;
	margin-inline: auto;
	color: var(--wp--preset--color--gold);
}

.scjs-training-medallion svg {
	inline-size: 100%;
	block-size: auto;
	display: block;
}

/* --- Small screens --- */

@media (max-width: 781px) {
	.scjs-training-strip {
		padding-block-start: var(--wp--preset--spacing--60);
	}

	.scjs-training-strip .scjs-training-icons li {
		flex-basis: 5.5rem;
		padding-inline: 0.5rem;
	}

	.scjs-training-medallion {
		max-inline-size: 220px;
	}
}


/* --- Accessibility floor -------------------------------------------------- */

:where(a:focus-visible),
:where(button:focus-visible),
:where(input:focus-visible),
:where(textarea:focus-visible),
:where(select:focus-visible) {
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.scjs-card,
	.scjs-card:hover {
		transition: none;
		transform: none;
	}
}
