/*
Theme Name: NTS
Theme URI: https://ntsolutions.co.za
Author: NTS
Description: Custom block theme for NTS (National Technology Solutions), Durban. Carbon and cyan, built around the NTS logo.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nts
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
::selection { background: var(--wp--preset--color--cyan); color: var(--wp--preset--color--ink); }

:where(.wp-site-blocks) > *,
.wp-site-blocks main.wp-block-group > * { margin-block-start: 0; margin-block-end: 0; }

/* Eyebrow label above headings */
.nts-eyebrow {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	font-size: .85rem;
	color: var(--wp--preset--color--cyan);
	display: inline-flex;
	align-items: center;
	gap: .6em;
}
.nts-eyebrow::before {
	content: "";
	width: 28px;
	height: 2px;
	background: currentColor;
	box-shadow: 0 0 10px currentColor;
}
.has-text-align-center.nts-eyebrow { justify-content: center; display: flex; }

/* ---------- Carbon texture (echoes the logo face) ---------- */
.nts-carbon {
	position: relative;
	isolation: isolate;
	background-color: var(--wp--preset--color--ink) !important;
	background-image:
		radial-gradient(ellipse 60% 70% at 80% 40%, rgba(75,195,232,.16), transparent 70%),
		linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%),
		linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%),
		linear-gradient(180deg, #232528, var(--wp--preset--color--ink));
	background-size: auto, 6px 6px, 6px 6px, auto;
	background-position: 0 0, 0 0, 3px 3px, 0 0;
}
.nts-carbon::after {
	/* thin cyan rule along the bottom edge */
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(75,195,232,.6), transparent);
	z-index: -1;
}

/* ---------- Header ---------- */
.nts-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(22,23,25,.97) !important;
	border-bottom: 1px solid rgba(75,195,232,.18);
}
.admin-bar .nts-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .nts-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .nts-header { top: 0; } }

.nts-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.nts-brand img { width: 46px; height: 46px; display: block; }
.nts-brand-name {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.35rem;
	letter-spacing: .12em;
	line-height: 1;
	color: var(--wp--preset--color--white);
}
.nts-brand-name small {
	display: block;
	font-size: .62rem;
	letter-spacing: .2em;
	color: var(--wp--preset--color--steel-light);
	font-weight: 600;
	margin-top: .3rem;
}

.nts-header .wp-block-navigation a { text-decoration: none; position: relative; }
.nts-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.nts-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--cyan); }
.nts-header .wp-block-navigation-item.nts-nav-cta > a {
	border: 1px solid var(--wp--preset--color--cyan);
	padding: .5em 1.1em;
	border-radius: 4px;
	color: var(--wp--preset--color--cyan);
	transition: background .2s, color .2s;
}
.nts-header .wp-block-navigation-item.nts-nav-cta > a:hover {
	background: var(--wp--preset--color--cyan);
	color: var(--wp--preset--color--ink) !important;
}
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--white) !important;
	padding: 1.5rem clamp(1rem, 4vw, 2rem) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start !important;
	padding-top: 3rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important;
	gap: 1.5rem !important;
	font-size: 1.5rem;
}

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .2s, color .2s, box-shadow .2s, transform .2s; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	box-shadow: 0 0 0 1px var(--wp--preset--color--cyan), 0 8px 28px rgba(75,195,232,.35);
	transform: translateY(-1px);
}
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	color: var(--wp--preset--color--cyan) !important;
}
.nts-btn-whatsapp .wp-block-button__link,
a.nts-btn-whatsapp {
	background: #25D366 !important;
	color: #0b2a17 !important;
}

/* ---------- Hero ---------- */
.nts-hero h1 { text-wrap: balance; }
.nts-hero h1 .nts-accent { color: var(--wp--preset--color--cyan); text-shadow: 0 0 24px rgba(75,195,232,.45); }
.nts-hero-logo { position: relative; display: flex; justify-content: center; }
.nts-hero-logo img {
	width: min(360px, 70vw);
	height: auto;
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(75,195,232,.25), 0 0 60px rgba(75,195,232,.28), 0 30px 80px rgba(0,0,0,.6);
	animation: nts-float 7s ease-in-out infinite;
}
.nts-hero-logo::before {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	width: min(460px, 88vw);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	border: 1px dashed rgba(75,195,232,.25);
	animation: nts-spin 60s linear infinite;
}
@keyframes nts-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes nts-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.nts-hero-logo img, .nts-hero-logo::before { animation: none; }
}

/* Small capability chips under the hero */
.nts-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.nts-chips p {
	margin: 0 !important;
	padding: .35em .85em;
	border: 1px solid rgba(255,255,255,.14);
	border-radius: 999px;
	font-size: .85rem;
	color: var(--wp--preset--color--steel-light);
	background: rgba(255,255,255,.03);
}

/* ---------- Cards ---------- */
.nts-card {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	transition: border-color .25s, box-shadow .25s, transform .25s;
	position: relative;
	overflow: hidden;
}
.nts-card::before {
	content: "";
	position: absolute;
	left: 0; top: 0;
	width: 100%; height: 3px;
	background: var(--wp--preset--color--cyan);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .35s ease;
}
.nts-card:hover { border-color: rgba(75,195,232,.55); box-shadow: 0 16px 40px rgba(26,27,29,.10); transform: translateY(-3px); }
.nts-card:hover::before { transform: scaleX(1); }
.nts-card-dark { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.03); }
.nts-card-dark:hover { box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.is-layout-grid > .nts-card { height: 100%; }

.nts-icon {
	width: 52px; height: 52px;
	border-radius: 10px;
	display: grid; place-items: center;
	background: rgba(75,195,232,.1);
	border: 1px solid rgba(75,195,232,.3);
	color: var(--wp--preset--color--cyan-deep);
}
.nts-card-dark .nts-icon, .nts-carbon .nts-icon { color: var(--wp--preset--color--cyan); }
.nts-icon svg { width: 26px; height: 26px; }

.nts-step-num {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 3rem;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--wp--preset--color--cyan-deep);
}

/* Check lists */
ul.nts-checks { list-style: none; padding-left: 0; }
ul.nts-checks li { position: relative; padding-left: 1.75em; margin-bottom: .55em; }
ul.nts-checks li::before {
	content: "";
	position: absolute; left: 0; top: .45em;
	width: .95em; height: .55em;
	border-left: 2px solid var(--wp--preset--color--cyan-deep);
	border-bottom: 2px solid var(--wp--preset--color--cyan-deep);
	transform: rotate(-45deg);
}
.nts-carbon ul.nts-checks li::before { border-color: var(--wp--preset--color--cyan); }

/* Service detail rows */
.nts-service-row { border-top: 1px solid var(--wp--preset--color--line); }
.nts-service-row:first-of-type { border-top: 0; }

/* ---------- Contact ---------- */
.nts-contact-list p { display: flex; gap: .75rem; align-items: flex-start; }
.nts-contact-list svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: .2em; color: var(--wp--preset--color--cyan-deep); }
.nts-contact-list a { color: inherit; }

.nts-form { display: grid; gap: 1rem; }
.nts-form .nts-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .nts-form .nts-row { grid-template-columns: 1fr; } }
.nts-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.nts-form input, .nts-form textarea, .nts-form select {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	padding: .8rem .9rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--charcoal);
	transition: border-color .2s, box-shadow .2s;
}
.nts-form input:focus, .nts-form textarea:focus, .nts-form select:focus {
	outline: none;
	border-color: var(--wp--preset--color--cyan);
	box-shadow: 0 0 0 3px rgba(75,195,232,.25);
}
.nts-form textarea { min-height: 150px; resize: vertical; }
.nts-form .nts-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.nts-form button {
	justify-self: start;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	font-size: 1rem;
	padding: .9rem 1.8rem;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	background: var(--wp--preset--color--cyan);
	color: var(--wp--preset--color--ink);
	transition: box-shadow .2s, transform .2s;
}
.nts-form button:hover { box-shadow: 0 8px 28px rgba(75,195,232,.4); transform: translateY(-1px); }
.nts-notice { padding: .9rem 1rem; border-radius: 6px; font-weight: 500; }
.nts-notice-ok { background: #e7f8ee; color: #135c33; border: 1px solid #a8e2c0; }
.nts-notice-err { background: #fdecec; color: #8a1c1c; border: 1px solid #f2b8b8; }

.nts-map iframe { width: 100%; height: 380px; border: 0; display: block; filter: grayscale(.35) contrast(1.05); }

/* ---------- Footer ---------- */
.nts-footer a { color: var(--wp--preset--color--steel-light); text-decoration: none; }
.nts-footer a:hover { color: var(--wp--preset--color--cyan); }
.nts-footer h2 { letter-spacing: .14em; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 781px) {
	.nts-hero .wp-block-columns { flex-direction: column-reverse; }
	.nts-hero-logo img { width: min(220px, 55vw); }
	.nts-hero-logo::before { width: min(290px, 75vw); }
}
.wp-block-navigation__responsive-container.is-menu-open .nts-nav-cta > a { padding: .5em 1.1em !important; }
.nts-footer-links { list-style: none; }
.nts-form .cf-turnstile { min-height: 65px; }
