/* ==========================================================================
   AI Multi-Site Theme — shared design system
   Mobile-first, no framework, CSS custom properties drive per-site theming
   (colors can be overridden by a future "brand colors" config field via
   an inline <style> in wp_head without touching this file).
   ========================================================================== */

:root {
	--smt-color-primary: #2563eb;
	--smt-color-primary-dark: #1d4ed8;
	--smt-color-secondary: #0f172a;
	--smt-color-accent: #f59e0b;
	--smt-color-bg: #ffffff;
	--smt-color-bg-alt: #f8fafc;
	--smt-color-fg: #1e293b;
	--smt-color-muted: #64748b;
	--smt-color-border: #e2e8f0;
	--smt-color-success: #16a34a;
	--smt-color-error: #dc2626;

	--smt-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--smt-radius: 0.75rem;
	--smt-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
	--smt-shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
	--smt-container-width: 1200px;
	--smt-gap: clamp(1.25rem, 2vw, 2rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--smt-font-sans);
	color: var(--smt-color-fg);
	background: var(--smt-color-bg);
	line-height: 1.6;
	font-size: 1rem;
	-webkit-font-smoothing: antialiased;
}
img, picture, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--smt-color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.25em; }
button { font-family: inherit; }

/* ---------- Accessibility ---------- */
:focus-visible {
	outline: 3px solid var(--smt-color-accent);
	outline-offset: 2px;
}
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.smt-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--smt-color-secondary);
	color: #fff;
	padding: 0.75em 1.25em;
	z-index: 1000;
	border-radius: 0 0 var(--smt-radius) 0;
}
.smt-skip-link:focus {
	left: 0;
}

/* ---------- Layout helpers ---------- */
.smt-container {
	max-width: var(--smt-container-width);
	margin-inline: auto;
	padding-inline: 1.25rem;
}
.smt-section { padding-block: clamp(3rem, 6vw, 6rem); }
.smt-section:nth-of-type(even) { background: var(--smt-color-bg-alt); }
.smt-section__heading {
	font-size: clamp(1.6rem, 3vw, 2.25rem);
	text-align: center;
	margin-bottom: 0.75em;
}
.smt-section__heading + p { text-align: center; }

/* ---------- Buttons ---------- */
.smt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.85em 1.75em;
	border-radius: 999px;
	font-weight: 600;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.smt-btn:hover { text-decoration: none; transform: translateY(-1px); }
.smt-btn--primary {
	background: var(--smt-color-primary);
	color: #fff;
}
.smt-btn--primary:hover { background: var(--smt-color-primary-dark); }
.smt-btn--secondary {
	background: transparent;
	border-color: currentColor;
	color: inherit;
}
.smt-btn--lg { padding: 1em 2.25em; font-size: 1.05rem; }

/* ---------- Header ---------- */
.smt-header {
	position: sticky;
	top: 0;
	background: var(--smt-color-bg);
	border-bottom: 1px solid var(--smt-color-border);
	z-index: 100;
}
.smt-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.85rem;
}
.smt-brand { display: inline-flex; align-items: center; }
.smt-brand__logo { max-height: 44px; width: auto; }
.smt-brand__name { font-weight: 800; font-size: 1.25rem; color: var(--smt-color-secondary); }

.smt-nav-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px; height: 44px;
	background: none;
	border: 1px solid var(--smt-color-border);
	border-radius: 8px;
	cursor: pointer;
}
.smt-nav-toggle__bar {
	display: block;
	height: 2px;
	width: 22px;
	margin-inline: auto;
	background: var(--smt-color-secondary);
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.smt-nav-toggle[aria-expanded="true"] .smt-nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.smt-nav-toggle[aria-expanded="true"] .smt-nav-toggle__bar:nth-child(2) { opacity: 0; }
.smt-nav-toggle[aria-expanded="true"] .smt-nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.smt-primary-nav {
	position: fixed;
	inset: 0 0 0 30%;
	background: var(--smt-color-bg);
	transform: translateX(100%);
	transition: transform 0.25s ease;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 5.5rem 1.5rem 2rem;
	overflow-y: auto;
	z-index: 99;
}
.smt-primary-nav.is-open { transform: translateX(0); }
.smt-primary-nav__list {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.smt-primary-nav__list a {
	color: var(--smt-color-fg);
	font-weight: 600;
	font-size: 1.1rem;
}
.smt-nav-cta { align-self: flex-start; }

/* ---------- Hero ---------- */
.smt-hero {
	position: relative;
	padding: 0;
	min-height: min(70vh, 640px);
	display: flex;
	align-items: center;
	color: #fff;
	overflow: hidden;
}
.smt-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.smt-hero__image { width: 100%; height: 100%; object-fit: cover; }
.smt-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15,23,42,0.55) 0%, rgba(15,23,42,0.75) 100%);
}
.smt-hero__inner {
	position: relative;
	z-index: 1;
	padding-block: clamp(4rem, 10vw, 7rem);
	max-width: 760px;
}
.smt-hero__heading { font-size: clamp(2rem, 5vw, 3.5rem); }
.smt-hero__subheading { font-size: clamp(1.05rem, 2vw, 1.25rem); opacity: 0.92; max-width: 60ch; }

/* ---------- Cards / grids ---------- */
.smt-services__grid, .smt-why-us__grid, .smt-testimonials__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--smt-gap);
}
@media (min-width: 640px) {
	.smt-services__grid, .smt-why-us__grid, .smt-testimonials__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
	.smt-services__grid, .smt-testimonials__grid { grid-template-columns: repeat(3, 1fr); }
	.smt-why-us__grid { grid-template-columns: repeat(4, 1fr); }
}

.smt-card {
	background: var(--smt-color-bg);
	border: 1px solid var(--smt-color-border);
	border-radius: var(--smt-radius);
	overflow: hidden;
	box-shadow: var(--smt-shadow);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
}
.smt-card:hover { box-shadow: var(--smt-shadow-lg); transform: translateY(-2px); }
.smt-card__body { padding: 1.5rem; }
.smt-card__title { font-size: 1.15rem; margin-bottom: 0.4em; }
.smt-card__text { color: var(--smt-color-muted); }
.smt-card__link { font-weight: 600; }

.smt-service-card__media { aspect-ratio: 4 / 3; background: var(--smt-color-bg-alt); }
.smt-service-card__image { width: 100%; height: 100%; object-fit: cover; }

.smt-why-us__item { padding: 1.25rem; }
.smt-why-us__title { font-size: 1.05rem; }
.smt-why-us__text { color: var(--smt-color-muted); }

/* ---------- About ---------- */
.smt-about__inner {
	display: grid;
	gap: var(--smt-gap);
	align-items: center;
}
@media (min-width: 860px) {
	.smt-about__inner { grid-template-columns: 1fr 1fr; }
}
.smt-about__image { border-radius: var(--smt-radius); aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Process ---------- */
.smt-process__list {
	list-style: none;
	margin: 0; padding: 0;
	display: grid;
	gap: var(--smt-gap);
}
@media (min-width: 760px) {
	.smt-process__list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
.smt-process__item { text-align: center; }
.smt-process__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem; height: 2.75rem;
	border-radius: 50%;
	background: var(--smt-color-primary);
	color: #fff;
	font-weight: 700;
	margin-bottom: 0.75rem;
}
.smt-process__text { color: var(--smt-color-muted); }

/* ---------- Testimonials ---------- */
.smt-testimonial-card__quote { padding: 1.5rem 1.5rem 0; font-style: italic; }
.smt-testimonial-card__author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0 1.5rem 1.5rem;
	margin-top: auto;
}
.smt-testimonial-card__photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* ---------- FAQ ---------- */
.smt-faq__list { max-width: 800px; margin-inline: auto; }
.smt-faq__item {
	border-bottom: 1px solid var(--smt-color-border);
	padding-block: 1rem;
}
.smt-faq__question {
	cursor: pointer;
	font-weight: 600;
	font-size: 1.05rem;
	list-style: none;
}
.smt-faq__question::-webkit-details-marker { display: none; }
.smt-faq__question::after {
	content: "+";
	float: right;
	font-weight: 400;
}
.smt-faq__item[open] .smt-faq__question::after { content: "\2212"; }
.smt-faq__answer { color: var(--smt-color-muted); padding-top: 0.75rem; }

/* ---------- CTA ---------- */
.smt-cta {
	background: var(--smt-color-secondary);
	color: #fff;
	text-align: center;
}
.smt-cta__inner { max-width: 700px; }
.smt-cta__heading { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.smt-cta__subheading { opacity: 0.85; }
.smt-cta .smt-btn--secondary { border-color: #fff; color: #fff; }

/* ---------- Contact ---------- */
.smt-contact__inner {
	display: grid;
	gap: var(--smt-gap);
}
@media (min-width: 860px) {
	.smt-contact__inner { grid-template-columns: 1fr 1fr; }
}
.smt-contact__list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.85rem; }
.smt-contact__label { display: block; font-size: 0.85rem; color: var(--smt-color-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.smt-contact__map iframe { width: 100%; border: 0; border-radius: var(--smt-radius); aspect-ratio: 16 / 10; }

.smt-contact-form {
	background: var(--smt-color-bg);
	border: 1px solid var(--smt-color-border);
	border-radius: var(--smt-radius);
	padding: 1.75rem;
	box-shadow: var(--smt-shadow);
}
.smt-form-row { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.smt-form-row label { font-weight: 600; font-size: 0.92rem; }
.smt-form-row input, .smt-form-row textarea {
	padding: 0.75em 0.9em;
	border: 1px solid var(--smt-color-border);
	border-radius: 0.5rem;
	font: inherit;
	width: 100%;
}
.smt-form-row input:focus, .smt-form-row textarea:focus { border-color: var(--smt-color-primary); }
.smt-form-honeypot { position: absolute; left: -9999px; }
.smt-form-status {
	padding: 0.75em 1em;
	border-radius: 0.5rem;
	margin-bottom: 1rem;
	font-weight: 600;
}
.smt-form-status[data-state="success"] { background: #dcfce7; color: var(--smt-color-success); }
.smt-form-status[data-state="error"] { background: #fee2e2; color: var(--smt-color-error); }

/* ---------- Footer ---------- */
.smt-footer { background: var(--smt-color-secondary); color: #cbd5e1; padding-block: 3rem 1.5rem; }
.smt-footer__inner {
	display: grid;
	gap: 1.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 760px) {
	.smt-footer__inner { grid-template-columns: 1fr auto auto; align-items: start; }
}
.smt-footer__logo { max-height: 36px; filter: brightness(0) invert(1); }
.smt-footer__name { font-weight: 800; color: #fff; }
.smt-footer__tagline { color: #94a3b8; margin-top: 0.5rem; }
.smt-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.smt-footer__list a, .smt-footer__social a { color: #cbd5e1; }
.smt-footer__social { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
.smt-footer__bottom { padding-top: 1.5rem; font-size: 0.85rem; color: #94a3b8; }

/* ---------- Generic content (blog/pages) ---------- */
.smt-content { padding-block: clamp(2.5rem, 5vw, 4rem); }
.smt-page-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.smt-post-list { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .smt-post-list { grid-template-columns: repeat(2, 1fr); } }
.smt-post-card__media img { border-radius: var(--smt-radius); aspect-ratio: 4/3; object-fit: cover; }
.smt-post-card__title { font-size: 1.15rem; margin-top: 0.75rem; }
.smt-pagination { margin-top: 2rem; display: flex; gap: 0.75rem; justify-content: center; }

/* ---------- Desktop nav override ---------- */
@media (min-width: 900px) {
	.smt-nav-toggle { display: none; }
	.smt-primary-nav {
		position: static;
		inset: auto;
		transform: none;
		flex-direction: row;
		align-items: center;
		background: transparent;
		padding: 0;
		overflow: visible;
	}
	.smt-primary-nav__list { flex-direction: row; gap: 1.75rem; }
	.smt-nav-cta { margin-left: 0.5rem; }
}
