/*
Theme Name: SoCal Information Services
Theme URI: https://www.socalis.net
Author: SoCal Information Services, LLC
Description: Custom block theme for socalis.net. Dark, restrained, built on the shield-logo blues.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: Proprietary
Text Domain: socalis
*/

/* ---------- Base ---------- */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

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

:where(a, button, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--ice);
	outline-offset: 3px;
	border-radius: 4px;
}

p, li {
	text-wrap: pretty;
}

h1, h2, h3 {
	text-wrap: balance;
}

.wp-element-button,
.wp-block-button__link {
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* ---------- Header ---------- */

.scis-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   trap the mobile menu overlay (position: fixed) inside the header box. */
.scis-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgb(7 14 26 / 0.86);
	backdrop-filter: saturate(140%) blur(10px);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
}

.admin-bar .scis-header {
	top: var(--wp-admin--admin-bar--height, 0);
}

.scis-header .wp-block-site-logo img {
	display: block;
}

.scis-brand .wp-block-site-title {
	line-height: 1.2;
}

.scis-brand .wp-block-site-tagline {
	margin: 0;
	line-height: 1.2;
}

@media (max-width: 600px) {
	.scis-header .scis-brand .wp-block-site-tagline { display: none; }
	.scis-header .scis-header-cta { display: none; }
}

.scis-header .wp-block-navigation-item__content {
	color: var(--wp--preset--color--silver);
}

.scis-header .wp-block-navigation-item__content:hover,
.scis-header .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--large);
}

/* ---------- Section helpers ---------- */

/* Small uppercase label above section headings */
.is-style-eyebrow {
	font-size: 0.75rem !important;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.5rem !important;
}

.has-silver-color a:not(.wp-element-button) {
	color: var(--wp--preset--color--ice);
}

/* Hero: a soft glow off the logo, nothing more */
.scis-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(60% 70% at 78% 45%, rgb(74 161 202 / 0.16), transparent 70%),
		radial-gradient(50% 60% at 10% 0%, rgb(29 79 147 / 0.22), transparent 70%),
		var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.scis-hero .scis-hero-logo img {
	filter: drop-shadow(0 20px 60px rgb(74 161 202 / 0.25));
}

@media (max-width: 781px) {
	.scis-hero .scis-hero-logo {
		max-width: 220px;
		margin-inline: auto;
	}
}

/* Bordered panel used for service cards */
.is-style-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	transition: border-color 0.2s ease;
}

.is-style-card:hover {
	border-color: var(--wp--preset--color--steel);
}

.is-style-card > :first-child { margin-top: 0; }
.is-style-card > :last-child { margin-bottom: 0; }

/* Lists with a small cyan tick instead of bullets */
.is-style-checklist {
	list-style: none;
	padding-left: 0 !important;
}

.is-style-checklist li {
	position: relative;
	padding-left: 1.6rem;
	margin-bottom: 0.45rem;
}

.is-style-checklist li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.55em;
	width: 0.6rem;
	height: 0.32rem;
	border-left: 2px solid var(--wp--preset--color--accent);
	border-bottom: 2px solid var(--wp--preset--color--accent);
	transform: rotate(-45deg);
}

/* Secondary button */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--steel);
	padding: calc(0.8rem - 1px) calc(1.5rem - 1px);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--ice);
	color: var(--wp--preset--color--ice);
	background: transparent;
}

/* Thin stat/credential row */
.scis-creds > .wp-block-group {
	border-left: 2px solid var(--wp--preset--color--cobalt);
	padding-left: 1rem;
}

/* Page title banner on inner pages */
.scis-page-banner {
	background:
		radial-gradient(50% 120% at 85% 0%, rgb(74 161 202 / 0.12), transparent 70%),
		var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Contact detail rows */
.scis-contact-line a {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

.scis-contact-line a:hover {
	color: var(--wp--preset--color--ice);
}

/* ---------- Footer ---------- */

.scis-footer {
	border-top: 1px solid var(--wp--preset--color--border);
}

.scis-footer a:not(.wp-element-button) {
	color: var(--wp--preset--color--silver);
}

.scis-footer a:not(.wp-element-button):hover {
	color: var(--wp--preset--color--contrast);
}

.scis-plain-list {
	list-style: none;
	padding-left: 0 !important;
}

.scis-plain-list li {
	margin-bottom: 0.4rem;
}

/* Certification tags */
.scis-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding-left: 0 !important;
}

.scis-chips li {
	padding: 0.3rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ice);
	font-size: 0.8rem;
	font-weight: 500;
	line-height: 1.4;
}

/* Certification logos. CompTIA's rules allow them only unaltered on
   white or #F4F4F4 with clear space, so they get their own light panel. */
.scis-badges {
	background: #FFFFFF;
	border-radius: 10px;
	padding: 1.5rem;
}

.scis-badges .wp-block-image {
	margin: 0;
}

.scis-badges img {
	display: block;
	width: 88px;
	height: 88px;
	object-fit: contain;
}

@media (max-width: 600px) {
	.scis-badges { padding: 1rem; }
	.scis-badges img { width: 72px !important; height: 72px; }
}

/* About page portrait */
.scis-headshot img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid var(--wp--preset--color--border);
}

/* On phones the sidebar column stacks below the bio; pull just the
   portrait up to the top and leave the badge card at the end. */
@media (max-width: 781px) {
	.wp-block-column:has(> .scis-headshot) {
		display: contents;
	}

	.wp-block-column:has(> .scis-headshot) > * {
		flex-basis: 100%;
	}

	.wp-block-column:has(> .scis-headshot) > .wp-block-spacer {
		display: none;
	}

	.scis-headshot {
		order: -1;
		max-width: 280px;
	}
}
