/* Appliance Repairs Cape Town — main stylesheet.
   System fonts only. Flat design (hairline borders, no drop shadows).
   Mobile-first. No animation beyond simple, cheap transitions on interactive states. */

:root {
	--bg: #FFFFFF;
	--surface: #F4F7FA;
	--ink: #0B2A4A;
	--accent: #1768D1;
	--accent-dark: #12539F;
	--border: #E4E9EF;
	--ink-soft: #4A6180;

	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--space-sm: 8px;
	--space-md: 20px;
	--space-lg: 64px;

	--radius-sm: 8px;
	--radius-md: 10px;

	--container: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font);
	font-weight: 400;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
	font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 var(--space-sm);
	color: var(--ink);
}
h1 { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: clamp(26px, 3.5vw, 34px); }
h3 { font-size: 20px; }

p { margin: 0 0 var(--space-md); max-width: 65ch; }

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

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: var(--radius-sm);
	font-weight: 700;
	font-size: 16px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
	white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-secondary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-secondary:hover { background: #071b33; border-color: #071b33; text-decoration: none; }
.btn-primary:visited, .btn-secondary:visited { color: #fff; }

/* ---------- Header ---------- */
.site-header {
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 50;
}
.site-header .container {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	padding-top: 14px;
	padding-bottom: 14px;
}
.site-branding { display: flex; align-items: center; gap: 10px; min-width: 0; }
.site-branding img { height: 56px; width: auto; }
.site-branding .site-name {
	font-weight: 800;
	font-size: 17px;
	color: var(--ink);
	line-height: 1.15;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.header-actions { display: flex; align-items: center; gap: var(--space-md); }
.header-phone {
	display: none;
	font-weight: 700;
	color: var(--ink);
	white-space: nowrap;
}
.primary-nav { display: none; }
.primary-nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.primary-nav a { color: var(--ink); font-weight: 600; }
.primary-nav a:hover { color: var(--accent); text-decoration: none; }

.nav-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg);
	cursor: pointer;
	padding: 0;
	flex: none;
}
.nav-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--ink);
	border-radius: 1px;
	transition: transform .15s ease, opacity .15s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	padding: var(--space-md);
}
.primary-nav.is-open { display: block; }
.primary-nav ul { flex-direction: column; gap: var(--space-sm); }
.primary-nav li { width: 100%; }
.primary-nav a { display: block; padding: 10px 0; }

/* Header CTA: short label + smaller padding on small screens, full label + normal size from tablet width up */
.site-header .btn-primary {
	padding: 10px 14px;
	font-size: 14px;
}
.site-header .btn-primary .cta-full { display: none; }
.site-header .btn-primary .cta-short { display: inline; }

@media (min-width: 640px) {
	.site-header .btn-primary {
		padding: 14px 28px;
		font-size: 16px;
	}
	.site-header .btn-primary .cta-full { display: inline; }
	.site-header .btn-primary .cta-short { display: none; }
}

/* Below 900px: CTA sits centered in the header, independent of the logo and toggle button */
.site-header .header-actions { position: static; }
.site-header .btn-primary {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

@media (min-width: 900px) {
	.header-phone { display: inline-flex; align-items: center; gap: 6px; }
	.nav-toggle { display: none; }
	.primary-nav {
		display: block;
		position: static;
		border-bottom: none;
		padding: 0;
		background: none;
	}
	.primary-nav ul { flex-direction: row; gap: 24px; }
	.primary-nav li { width: auto; }
	.primary-nav a { padding: 0; }

	/* Restore normal flow for the CTA at desktop width */
	.site-header .btn-primary {
		position: static;
		transform: none;
	}
}

/* ---------- Hero ---------- */
.hero {
	background: var(--surface);
	overflow: hidden;
}
.hero .container {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-lg);
	align-items: center;
	padding-top: var(--space-lg);
	padding-bottom: var(--space-lg);
}
.hero-copy .eyebrow {
	display: inline-block;
	font-weight: 700;
	color: var(--accent);
	font-size: 14px;
	margin-bottom: var(--space-sm);
}
.hero-copy h1 { margin-bottom: var(--space-md); }
.hero-copy .lead {
	font-size: 19px;
	color: var(--ink-soft);
	max-width: 52ch;
	margin-bottom: var(--space-md);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-md); }
.hero-trust {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ink-soft);
	font-size: 15px;
	font-weight: 600;
}
.hero-trust .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.hero-media {
	position: relative;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid var(--border);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

@media (min-width: 900px) {
	.hero .container {
		grid-template-columns: 1.05fr 0.95fr;
		padding-top: 88px;
		padding-bottom: 88px;
	}
}

/* ---------- Sections shared ---------- */
.section { padding: var(--space-lg) 0; }
.section-surface { background: var(--surface); }
.section-head { max-width: 62ch; margin-bottom: var(--space-lg); }
.section-head p { color: var(--ink-soft); }

/* ---------- Service cards ---------- */
.service-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-md);
}
@media (min-width: 700px) {
	.service-grid { grid-template-columns: repeat(4, 1fr); }
}
.service-card {
	display: block;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow: hidden;
	color: var(--ink);
	transition: border-color .15s ease;
}
.service-card:hover { border-color: var(--accent); text-decoration: none; }
.service-card .thumb {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}
.service-card .card-body { padding: var(--space-md); }
.service-card .icon {
	width: 40px; height: 40px;
	border-radius: var(--radius-sm);
	background: var(--surface);
	display: flex; align-items: center; justify-content: center;
	margin-bottom: var(--space-sm);
	color: var(--accent);
	font-weight: 800;
}
.service-card h3 { margin-bottom: 4px; font-size: 17px; }
.service-card span.desc { color: var(--ink-soft); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--ink);
	color: #C9D6E6;
	padding: var(--space-lg) 0 var(--space-md);
}
.site-footer a { color: #fff; }
.site-footer .container {
	display: grid;
	gap: var(--space-lg);
	grid-template-columns: 1fr;
}
@media (min-width: 800px) {
	.site-footer .container { grid-template-columns: 1.2fr 1fr 1fr; }
}
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: var(--space-sm); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.12);
	margin-top: var(--space-lg);
	padding-top: var(--space-md);
	font-size: 13px;
	color: #8FA3BE;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: #fff;
	padding: 10px 16px;
	z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Content / service pages ---------- */
.page-hero {
	background: var(--surface);
	padding: 48px 0;
	border-bottom: 1px solid var(--border);
}
.page-hero .breadcrumb {
	font-size: 14px;
	color: var(--ink-soft);
	margin-bottom: var(--space-sm);
}
.page-hero .breadcrumb a { color: var(--ink-soft); }
.page-hero h1 { margin-bottom: var(--space-sm); }
.page-hero .lead { color: var(--ink-soft); font-size: 18px; margin-bottom: var(--space-md); max-width: 62ch; }

.page-body {
	padding: var(--space-lg) 0;
}
.page-body .layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-lg);
}
@media (min-width: 960px) {
	.page-body .layout { grid-template-columns: 2fr 1fr; align-items: start; }
}
.prose h2 { margin-top: var(--space-lg); font-size: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-md); font-size: 18px; }
.prose ul { padding-left: 20px; color: var(--ink-soft); }
.prose li { margin-bottom: 6px; }
.prose p { color: var(--ink-soft); }

.side-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: var(--space-md);
	position: sticky;
	top: 90px;
}
.side-card h3 { margin-bottom: var(--space-sm); }
.side-card .btn { width: 100%; margin-bottom: var(--space-sm); }
.side-card img { border-radius: var(--radius-sm); margin-bottom: var(--space-md); aspect-ratio: 4/3; object-fit: cover; }

.faq-item { border-top: 1px solid var(--border); padding: var(--space-md) 0; }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item h3 { margin-bottom: 6px; font-size: 17px; }
.faq-item p { margin-bottom: 0; color: var(--ink-soft); }

.cta-band {
	background: var(--ink);
	color: #fff;
	padding: var(--space-lg) 0;
	text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #C9D6E6; margin-left: auto; margin-right: auto; }

/* ---------- Contact form ---------- */
.contact-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-lg);
}
@media (min-width: 900px) {
	.contact-layout { grid-template-columns: 1.3fr 1fr; align-items: start; }
}
.contact-form {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
}
.field { margin-bottom: var(--space-md); }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.field input, .field select, .field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-family: var(--font);
	font-size: 16px;
	color: var(--ink);
	background: var(--bg);
}
.field input:focus, .field select:focus, .field textarea:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}
.field-row { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 600px) {
	.field-row.two { grid-template-columns: 1fr 1fr; }
}
.hp-field { position: absolute; left: -9999px; }
.form-notice {
	padding: 14px 18px;
	border-radius: var(--radius-sm);
	margin-bottom: var(--space-md);
	font-weight: 600;
}
.form-notice.success { background: #E7F5EC; color: #1A6B3C; border: 1px solid #BFE6CC; }
.form-notice.error { background: #FCEAEA; color: #A32424; border: 1px solid #F3C6C6; }
.contact-info-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
}
.contact-info-card h3 { margin-bottom: var(--space-sm); }
.contact-info-card p { margin-bottom: var(--space-sm); }
/* ---------- Homepage extras ---------- */
.reviews-placeholder {
	border: 2px dashed var(--border);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
	text-align: center;
	color: var(--ink-soft);
	background: var(--surface);
}
.reviews-placeholder strong { color: var(--ink); }
.local-section p { max-width: 68ch; }
/* ---------- Blog ---------- */
.blog-list { display: grid; grid-template-columns: 1fr; gap: var(--space-md); max-width: 800px; }
@media (min-width: 700px) { .blog-list { grid-template-columns: 1fr 1fr; } }
.blog-card {
	display: block; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md);
	padding: var(--space-md); color: var(--ink);
}
.blog-card:hover { border-color: var(--accent); text-decoration: none; }
.blog-card .date { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; display:block; }
.blog-card h2, .blog-card h3 { font-size: 18px; margin-bottom: 6px; }
.blog-card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 0; }
.single-article .prose { max-width: 720px; }