/*
Theme Name: NumLogic
Theme URI: https://numlogic.com/
Description: Lightweight child theme of Twenty Twenty-Five for numlogic.com. Brand tokens live in theme.json; this file only holds the few styles theme.json can't express.
Author: NumLogic
Author URI: https://numlogic.com/
Template: twentytwentyfive
Version: 1.2.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: numlogic
*/

/* Sticky header with a hairline border once content scrolls under it. */
.nl-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent);
	backdrop-filter: saturate(180%) blur(8px);
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 92%, transparent);
}

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

/* Full-bleed sections sit flush against the header and footer. */
.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* Footer link lists: no bullets, underline on hover only. */
.wp-site-blocks > footer .wp-block-list {
	list-style: none;
	padding-left: 0;
}

.wp-site-blocks > footer {
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--hero-ink) 14%, transparent);
}

.wp-site-blocks > footer a {
	text-decoration: none;
}

.wp-site-blocks > footer a:hover {
	text-decoration: underline;
}

/*
 * Accent text colour is context-aware so highlight text is always readable:
 * the theme's "link" colour on page, alternate and card backgrounds, and the
 * hero link colour inside hero sections. Never use the raw accent fill as text.
 */
:root {
	--nl-accent-text: var(--wp--preset--color--accent-2);
}

.is-style-nl-dark {
	--nl-accent-text: var(--wp--preset--color--hero-link);
}

.is-style-nl-card {
	--nl-accent-text: var(--wp--preset--color--accent-2);
}

/* Small uppercase label above headings. */
.nl-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
	color: var(--nl-accent-text);
}

/* Large step numbers (01, 02 ...). */
.nl-num {
	color: var(--nl-accent-text);
}

/* Cards keep their own text colours when placed inside a hero section. */
.is-style-nl-card.is-style-nl-card :is(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--contrast);
}

.is-style-nl-card.is-style-nl-card a:not(.wp-element-button) {
	color: var(--wp--preset--color--accent-2);
}

.is-style-nl-card.is-style-nl-card {
	color: var(--wp--preset--color--contrast);
}

/* Checklist style for core/list (registered in functions.php). */
.wp-block-list.is-style-nl-checks {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-nl-checks li {
	position: relative;
	padding-left: 1.75em;
	margin-bottom: 0.5em;
}

.wp-block-list.is-style-nl-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 1.1em;
	height: 1.1em;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-1);
}

.wp-block-list.is-style-nl-checks li::after {
	content: "";
	position: absolute;
	left: 0.4em;
	top: 0.52em;
	width: 0.28em;
	height: 0.5em;
	border: solid var(--wp--preset--color--accent-3);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* FAQ accordion (core/details). */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	padding-block: var(--wp--preset--spacing--30);
}

.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--outfit);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	list-style-position: outside;
}

.wp-block-details[open] summary {
	margin-bottom: var(--wp--preset--spacing--20);
}

/* Visible keyboard focus everywhere. */
:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-2);
	outline-offset: 2px;
}

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

/* Skip link: visible on focus. */
.skip-link.screen-reader-text:focus,
.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
	padding: 0.75em 1.25em;
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--accent-3);
	font-weight: 600;
	text-decoration: none;
	border-radius: 999px;
}

/* Header phone: wide screens only. */
.nl-header-phone {
	display: none;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	white-space: nowrap;
}

.nl-header-phone a {
	text-decoration: none;
}

@media (min-width: 1024px) {
	.nl-header-phone {
		display: block;
	}
}

/* Post cards: subtle lift on hover, equal height in the grid. */
.nl-post-card {
	height: 100%;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nl-post-card:hover,
.nl-post-card:focus-within {
	transform: translateY(-3px);
	box-shadow: 0 2px 4px rgba(var(--nlt-shadow, 11, 18, 32), 0.1), 0 14px 32px rgba(var(--nlt-shadow, 11, 18, 32), 0.16);
}

.nl-post-card .wp-block-post-featured-image {
	margin-bottom: var(--wp--preset--spacing--30);
}

.nl-post-card .wp-block-post-featured-image img {
	border-radius: 10px;
}

.nl-post-card .wp-block-post-title a,
.nl-post-card .wp-block-post-terms a {
	text-decoration: none;
}

.nl-post-card .wp-block-post-terms a {
	color: var(--wp--preset--color--accent-2);
}

.nl-post-card .wp-block-post-date {
	color: var(--wp--preset--color--accent-4);
}

/* Post header meta and category link on navy. */
.nl-post-cat a,
.nl-post-meta {
	color: inherit;
	text-decoration: none;
}

.nl-post-cat a {
	color: var(--nl-accent-text);
}

/* Article typography. */
.nl-article {
	font-size: 1.125rem;
	line-height: 1.75;
}

.nl-article > .wp-block-post-content > * {
	max-width: 70ch;
}

.nl-article h2 {
	margin-top: 2.25em;
	margin-bottom: 0.6em;
}

.nl-article h3 {
	margin-top: 1.75em;
	margin-bottom: 0.5em;
}

.nl-article p,
.nl-article ul,
.nl-article ol {
	margin-block: 1.1em;
}

.nl-article li + li {
	margin-top: 0.4em;
}

.nl-article blockquote,
.nl-article .wp-block-quote {
	margin-inline: 0;
	padding: 0.25em 0 0.25em 1.25em;
	border-left: 4px solid var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--accent-4);
	font-size: 1.1875rem;
}

.nl-article .wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}

.nl-article .wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	min-width: 480px;
	font-size: 0.9375rem;
}

.nl-article .wp-block-table th,
.nl-article .wp-block-table td {
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent);
	padding: 0.65em 0.85em;
	text-align: left;
	vertical-align: top;
}

.nl-article .wp-block-table thead th,
.nl-article .wp-block-table th {
	background: var(--wp--preset--color--accent-5);
	font-family: var(--wp--preset--font-family--outfit);
}

.nl-article .nl-article-cta,
.nl-article-cta {
	margin-block: 2em;
}

.nl-article img {
	height: auto;
	border-radius: 8px;
}

@media (max-width: 600px) {
	.nl-article {
		font-size: 1.0625rem;
	}
}
