/*
Theme Name: ScioTech
Theme URI: https://sciotech.co.uk
Author: ScioTech Ltd
Author URI: https://sciotech.co.uk
Description: Modern dark theme for ScioTech Ltd — an electronics, hardware and embedded software design workshop. Built from scratch with a custom nav menu, front page, Solutions, About us and Contact templates.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: sciotech
*/

:root {
	--bg: #0a0a0a;
	--bg-alt: #121212;
	--surface: #1a1a1a;
	--surface-2: #202020;
	--border: #2a2a2a;
	--text: #f5f5f5;
	--text-muted: #a3a3a3;
	--accent: #ff6b00;
	--accent-dark: #cc5500;
	--radius: 12px;
	--max-width: 1200px;
	--font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p {
	margin: 0 0 1em;
	color: var(--text-muted);
	line-height: 1.75;
	text-align: justify;
	text-align-last: left;
	-webkit-hyphens: auto;
	hyphens: auto;
}
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 600; }

/* Content lists (used in body copy — Solutions steps, page content, etc.) */
ul.content-list, .page-content ul, .step-card__body ul, .hero__lead-list {
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
	display: grid;
	gap: 10px;
}
ul.content-list li, .page-content li, .step-card__body li, .hero__lead-list li {
	position: relative;
	padding-left: 22px;
	color: var(--text-muted);
	text-align: left;
}
ul.content-list li::before, .page-content li::before, .step-card__body li::before, .hero__lead-list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 7px;
	height: 7px;
	border-radius: 2px;
	background: var(--accent);
}

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 1rem; left: 1rem;
	width: auto; height: auto; clip: auto;
	background: var(--accent); color: #000;
	padding: 0.75rem 1.25rem; border-radius: 8px; z-index: 999;
}

.container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }

/* Scroll reveal — elements fade/slide in the first time they enter the viewport */
.reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--delay-1 { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
	.reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(10, 10, 10, 0.85);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.site-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 16px 24px;
}
.site-branding img,
.site-logo-fallback img { height: 40px; width: auto; }
.custom-logo-link { display: flex; align-items: center; }

.site-nav { margin-left: auto; }
.nav-menu, .footer-menu {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
}
.nav-menu a {
	color: var(--text);
	font-weight: 500;
	font-size: 0.95rem;
}
.nav-menu a:hover, .nav-menu .current-menu-item > a { color: var(--accent); }

.header-cta { flex-shrink: 0; }

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	background: none;
	border: 1px solid var(--border);
	border-radius: 8px;
	cursor: pointer;
	margin-left: 8px;
}
.nav-toggle__bars {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 18px;
}
.nav-toggle__bar {
	width: 18px; height: 2px;
	background: var(--text);
	margin: 0 auto;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #0a0a0a; }
.btn--primary:hover { background: var(--accent-dark); color: #0a0a0a; }
.btn--outline { border-color: var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--small { padding: 10px 20px; font-size: 0.85rem; }

/* Hero */
.hero { padding: 120px 0 90px; text-align: center; }
.hero__inner { max-width: 820px; margin: 0 auto; }
.eyebrow {
	display: inline-block;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-muted);
	margin-bottom: 16px;
}
.eyebrow--accent { color: var(--accent); font-weight: 700; }
.hero__lead { font-size: 1.15rem; max-width: 100%; margin: 0 auto 32px; text-align: center; text-align-last: center; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.page-hero {
	padding: 72px 0 48px;
	border-bottom: 1px solid var(--border);
	background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}
.page-hero .hero__lead { max-width: 100%; margin: 0 0 1.15em; text-align: justify; text-align-last: left; }
.page-hero .hero__lead:last-child { margin-bottom: 0; }
.page-hero .hero__lead-list {
	max-width: 900px;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px 32px;
}
.hero__lead-list li { font-size: 1.05rem; }

/* About page — "Who We Are" as a left-aligned column, half the page width */
.about-intro { width: 50%; text-align: left; }
.about-intro .hero__lead { text-align: justify; text-align-last: left; }

/* Two column feature rows */
.two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: start;
}
.lead-text { font-size: 1.05rem; }
.lead-text--full { max-width: 900px; }

/* Steps grid (Solutions) */
.steps-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.step-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	transition: border-color 0.2s ease, transform 0.2s ease;
}
.step-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.step-card__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 12px;
}
.step-card__icon {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}
.step-card__head h3 { margin: 0; }
.step-card__number {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 800;
	color: var(--accent);
	margin-bottom: 12px;
}
.step-card__body p { font-size: 0.92rem; margin: 0 0 0.85em; }
.step-card__body > :last-child { margin-bottom: 0; }
.step-card__body ul { margin: 0 0 0.85em; }
.step-card__body li { font-size: 0.92rem; }

/* Tag cloud (About) */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tag {
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 0.88rem;
}

/* CTA banner */
.cta-banner {
	background: linear-gradient(135deg, #1a1a1a, #241206);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	padding: 72px 0;
}
.cta-banner__inner { text-align: center; max-width: 640px; margin: 0 auto; }
.cta-banner p { margin-bottom: 28px; text-align: center; text-align-last: center; }

/* Contact page */
.two-col--contact { grid-template-columns: 0.8fr 1.2fr; }
.contact-details { display: flex; flex-direction: column; gap: 28px; }
.contact-detail h3 { color: var(--accent); font-size: 1rem; margin-bottom: 6px; }
.contact-detail p { margin-bottom: 0; }

.contact-form-wrap {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 32px;
}
.form-row { margin-bottom: 20px; }
.form-row label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--text);
}
.form-row input,
.form-row textarea {
	width: 100%;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 12px 14px;
	color: var(--text);
	font-family: var(--font);
	font-size: 0.95rem;
	resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
	outline: none;
	border-color: var(--accent);
}
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.form-notice {
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 0.92rem;
}
.form-notice--success { background: rgba(255, 107, 0, 0.12); border: 1px solid var(--accent); color: var(--text); }
.form-notice--error { background: rgba(220, 60, 60, 0.12); border: 1px solid #dc3c3c; color: var(--text); }

/* WPForms embed — restyled to match the dark theme instead of WPForms' light defaults */
.contact-form-wrap .wpforms-container { margin: 0; }
.contact-form-wrap .wpforms-form .wpforms-field { padding: 0 0 20px; }
.contact-form-wrap .wpforms-form .wpforms-field-label {
	color: var(--text);
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 8px;
}
.contact-form-wrap .wpforms-form input[type=text],
.contact-form-wrap .wpforms-form input[type=email],
.contact-form-wrap .wpforms-form input[type=tel],
.contact-form-wrap .wpforms-form input[type=number],
.contact-form-wrap .wpforms-form textarea,
.contact-form-wrap .wpforms-form select {
	width: 100%;
	background: var(--bg) !important;
	border: 1px solid var(--border) !important;
	border-radius: 8px !important;
	padding: 12px 14px !important;
	color: var(--text) !important;
	font-family: var(--font);
	font-size: 0.95rem;
}
.contact-form-wrap .wpforms-form input:focus,
.contact-form-wrap .wpforms-form textarea:focus,
.contact-form-wrap .wpforms-form select:focus { outline: none; border-color: var(--accent) !important; }
.contact-form-wrap .wpforms-form .wpforms-submit-container button,
.contact-form-wrap .wpforms-form button[type=submit] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px !important;
	border-radius: 999px !important;
	font-weight: 600;
	font-size: 0.95rem;
	background: var(--accent) !important;
	border: none !important;
	color: #0a0a0a !important;
	cursor: pointer;
}
.contact-form-wrap .wpforms-form .wpforms-submit-container button:hover,
.contact-form-wrap .wpforms-form button[type=submit]:hover { background: var(--accent-dark) !important; }
.contact-form-wrap .wpforms-confirmation-container { color: var(--text); }

/* Generic page content (WYSIWYG) */
.page-content { max-width: 800px; }
.page-title { margin-bottom: 32px; }

.content-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.content-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
}

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-top: 64px; }
.footer__inner {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 32px;
	padding-bottom: 48px;
}
.footer__brand p { font-size: 0.9rem; margin-top: 16px; }
.footer__col h3 { font-size: 0.95rem; color: var(--text); margin-bottom: 14px; }
.footer__col p { font-size: 0.9rem; }
.footer-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-menu a { color: var(--text-muted); font-size: 0.9rem; }
.footer-menu a:hover { color: var(--accent); }

.footer__bottom {
	border-top: 1px solid var(--border);
	padding: 20px 0;
}
.footer__bottom p { margin: 0; font-size: 0.85rem; text-align: center; text-align-last: center; }

/* Responsive */
@media (max-width: 900px) {
	.two-col, .two-col--contact, .content-grid { grid-template-columns: 1fr; }
	.steps-grid { grid-template-columns: repeat(2, 1fr); }
	.footer__inner { grid-template-columns: 1fr 1fr; }
	.page-hero .hero__lead-list { grid-template-columns: 1fr; }
	.about-intro { width: 100%; }
}

@media (max-width: 720px) {
	.site-nav {
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.25s ease;
	}
	.site-nav.is-open { max-height: 400px; }
	.nav-menu { flex-direction: column; gap: 0; padding: 8px 24px 16px; }
	.nav-menu li { border-top: 1px solid var(--border); }
	.nav-menu a { display: block; padding: 14px 0; }
	.header-cta { display: none; }
	.nav-toggle { display: flex; }
	.steps-grid { grid-template-columns: 1fr; }
	.footer__inner { grid-template-columns: 1fr; }
	.hero { padding: 80px 0 56px; }
}
