/*
Theme Name: Puls Appliance Repair
Theme URI: https://pulsappliance.com
Author: Puls Appliance Repair
Description: Custom lightweight theme for Puls Appliance Repair — hand-coded, no page builder, no build tooling.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: puls-appliance
*/

/* ==========================================================================
   Fonts — self-hosted, latin subset only, single weight each (~23kb total)
   ========================================================================== */
@font-face {
	font-family: "Playfair Display";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/playfair-700.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122;
}
@font-face {
	font-family: "Playfair Display";
	font-style: italic;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/playfair-600italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122;
}

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
	--color-bg: #ffffff;
	--color-bg-alt: #f4f6fb;
	--color-bg-dark: #12172b;
	--color-text: #171a2b;
	--color-text-muted: #5b6070;
	--color-text-inverse: #ffffff;
	--color-primary: #017aff;
	--color-primary-dark: #005290;
	--color-primary-light: #e5f2ff;
	--color-accent: #ff6b4a;
	--color-border: #e4e6ef;
	--color-success: #1fa971;

	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-heading: "Playfair Display", Georgia, "Times New Roman", serif;

	--container-width: 1180px;
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--shadow-card: 0 4px 20px rgba(23, 26, 43, 0.06);
	--shadow-card-hover: 0 10px 30px rgba(23, 26, 43, 0.1);
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-text);
	background: var(--color-bg);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--color-text-muted); }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--color-primary); color: #fff; padding: 12px 20px; z-index: 10000; border-radius: 0 0 var(--radius-sm) 0; }
.skip-link:focus { left: 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; box-shadow: var(--shadow-card-hover); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-light { background: #fff; color: var(--color-primary); }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-topbar {
	background: var(--color-bg-dark);
	color: #8489a8;
	font-size: 0.7rem;
	letter-spacing: .09em;
	text-transform: uppercase;
}
.site-topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; padding-bottom: 10px; gap: 16px; flex-wrap: wrap; }
.site-topbar a { color: #fff; font-weight: 700; letter-spacing: .05em; }

.site-header {
	position: sticky;
	top: 0;
	z-index: 500;
	background: rgba(255,255,255,0.98);
	border-bottom: 1px solid var(--color-border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; gap: 24px; }
.site-logo { font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; color: var(--color-text); display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.site-logo img { max-height: 42px; width: auto; }
.site-logo span.accent { color: var(--color-primary); }
.site-logo .logo-full { display: inline; }
.site-logo .logo-short { display: none; }

.primary-nav { display: flex; align-items: center; gap: 32px; }
.primary-nav ul { display: flex; gap: 30px; }
.primary-nav a { color: var(--color-text); font-weight: 700; font-size: 0.78rem; letter-spacing: .07em; text-transform: uppercase; }
.primary-nav a:hover { color: var(--color-primary); }

.header-actions { display: flex; align-items: center; gap: 22px; }
.header-phone { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.header-phone__label { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); }
.header-phone__number { font-weight: 700; color: var(--color-text); font-size: .95rem; }

.nav-toggle { display: none; background: none; border: 2px solid var(--color-border); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; }
.nav-close { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 900px) {
	.primary-nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw); background: #fff; flex-direction: column; align-items: stretch; padding: 28px; transform: translateX(100%); transition: transform .25s ease; box-shadow: -10px 0 30px rgba(0,0,0,.15); z-index: 700; }
	.primary-nav.is-open { transform: translateX(0); }
	.primary-nav ul { flex-direction: column; gap: 4px; margin-top: 20px; }
	.primary-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
	.header-actions .btn-primary span.long { display: none; }
	.nav-toggle { display: inline-flex; }

	.nav-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: var(--color-bg-alt);
		border: 0;
		border-radius: var(--radius-sm);
		width: 36px;
		height: 36px;
		cursor: pointer;
		color: var(--color-text);
		align-self: flex-end;
	}

	.nav-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(15, 18, 32, .45);
		z-index: 600;
		opacity: 0;
		pointer-events: none;
		transition: opacity .25s ease;
	}
	.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
}

@media (max-width: 700px) {
	.site-topbar { display: none; }
}

@media (max-width: 560px) {
	.site-header .container { gap: 10px; padding-left: 16px; padding-right: 16px; }
	.site-logo { font-size: 1.1rem; }
	.site-logo .logo-full { display: none; }
	.site-logo .logo-short { display: inline; }
	.header-phone { display: none; }
	.header-actions { gap: 10px; }
	.header-actions .btn { padding: 12px 18px; font-size: 0.88rem; }
}

/* ==========================================================================
   Hero — full-bleed dark editorial treatment; background photo (once the
   client uploads one via ACF) drops in behind the same gradient overlay.
   ========================================================================== */
.hero {
	position: relative;
	overflow: hidden;
	padding: 130px 0 96px;
	color: #fff;
	background: linear-gradient(125deg, #0a0e1c 0%, #141c38 55%, #0a0e1c 100%);
	background-size: cover;
	background-position: center;
}
.hero.has-image {
	background-image:
		linear-gradient(100deg, rgba(8, 11, 22, .93) 0%, rgba(8, 11, 22, .78) 40%, rgba(8, 11, 22, .4) 100%),
		var(--hero-image);
}
.hero .container { position: relative; z-index: 1; max-width: 700px; }
.hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 14px;
	color: #a9c4ff;
	font-weight: 700;
	font-size: .74rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	margin-bottom: 24px;
}
.hero__eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .6; }
.hero h1 { color: #fff; }
.hero > .container > p, .hero__content p { color: rgba(255, 255, 255, .7); font-size: 1.08rem; max-width: 540px; }
.hero__actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.hero__call { display: flex; flex-direction: column; line-height: 1.25; color: #fff; font-weight: 700; }
.hero__call span { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .5); font-weight: 500; }
.hero__trust { display: flex; gap: 44px; margin-top: 58px; flex-wrap: wrap; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, .16); }
.hero__trust div strong { display: block; font-size: 1.7rem; color: #fff; font-family: var(--font-heading); }
.hero__trust div span { font-size: .78rem; color: rgba(255, 255, 255, .55); }

/* ==========================================================================
   Sections / grids
   ========================================================================== */
.section { padding: 64px 0; }
.section--alt { background: var(--color-bg-alt); }
.section__head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section__head p { font-size: 1.05rem; }

.grid { display: grid; gap: 22px; }
.grid--services { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--brands { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--cities { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) {
	.grid--services, .grid--brands, .grid--cities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
	.grid--services, .grid--brands, .grid--cities, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
	.grid--services, .grid--brands, .grid--cities, .grid--3 { grid-template-columns: minmax(0, 1fr); }
}

.card {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: 26px;
	transition: box-shadow .2s ease, transform .2s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.card__icon { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--color-primary-light); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--color-primary); }
.card__icon img { width: 28px; height: 28px; object-fit: contain; }
.card h3 { margin-bottom: 8px; }
.card h3 a { color: inherit; }
.card p { font-size: 0.92rem; margin-bottom: 14px; }
.card__link { margin-top: auto; font-weight: 700; font-size: 0.9rem; }

.card--brand { align-items: center; text-align: center; justify-content: center; }
.card--brand img { max-height: 46px; width: auto; margin: 0 auto 12px; filter: grayscale(1); opacity: .75; transition: filter .2s ease, opacity .2s ease; }
.card--brand:hover img { filter: grayscale(0); opacity: 1; }
.card--brand h3 { font-size: 1rem; }

.card--city { }
.card--city .card__meta { font-size: 0.85rem; color: var(--color-text-muted); }

/* Process steps */
.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 40px; }
.steps .card::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	top: -18px; left: 26px;
	width: 36px; height: 36px;
	border-radius: 50%;
	background: var(--color-primary);
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-weight: 800;
	box-shadow: 0 6px 16px rgba(75,60,240,.35);
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:first-child { border-top: 1px solid var(--color-border); }
.faq-item__q { width: 100%; text-align: left; background: none; border: 0; padding: 20px 0; font-weight: 700; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer; color: var(--color-text); }
.faq-item__q .icon { transition: transform .2s ease; flex: none; margin-left: 16px; }
.faq-item[open] .faq-item__q .icon { transform: rotate(45deg); }
.faq-item__a { padding: 0 0 20px; }

/* CTA banner */
.cta-banner { background: var(--color-bg-dark); color: #fff; border-radius: var(--radius-lg); padding: 56px; text-align: center; }
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #b9bdd6; max-width: 560px; margin-left: auto; margin-right: auto; }

/* Breadcrumb */
.breadcrumb { font-size: 0.85rem; color: var(--color-text-muted); padding: 18px 0; }
.breadcrumb a { color: var(--color-text-muted); }

/* Single content pages */
.page-hero { padding: 48px 0 40px; background: var(--color-bg-alt); }
.page-hero h1 { margin-bottom: 12px; }
.content-columns { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; padding: 56px 0; }
@media (max-width: 900px) { .content-columns { grid-template-columns: minmax(0, 1fr); } }
.sidebar-box { background: var(--color-bg-alt); border-radius: var(--radius-md); padding: 26px; margin-bottom: 22px; }
.sidebar-box h3 { margin-bottom: 14px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list a { background: #fff; border: 1px solid var(--color-border); padding: 8px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--color-text); }
.tag-list a:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Zip/suburb table */
.zip-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.zip-table th, .zip-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
.zip-table th { color: var(--color-text-muted); font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: .04em; }

/* Schedule service / iframe facade */
.booking-block { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 40px; text-align: center; box-shadow: var(--shadow-card); }
.booking-facade { border: 2px dashed var(--color-border); border-radius: var(--radius-md); padding: 60px 24px; cursor: pointer; background: var(--color-bg-alt); }
.booking-facade:hover { border-color: var(--color-primary); }
.booking-iframe-wrap { min-height: 450px; }
.booking-iframe-wrap iframe { width: 100%; min-height: 450px; border: 0; }

/* Footer */
.site-footer { background: var(--color-bg-dark); color: #b9bdd6; padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #b9bdd6; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { color: #8d92b3; }
.footer-hours li { display: flex; justify-content: space-between; gap: 12px; }
.footer-bottom { padding: 22px 0; font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom .legal-links { display: flex; gap: 18px; }
.footer-bottom a { color: #b9bdd6; }

@media (max-width: 900px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.footer-grid { grid-template-columns: minmax(0, 1fr); }
	.footer-bottom { flex-direction: column; text-align: center; }
}

/* Show more / show less collapsible grids (homepage Brands/Cities preview) */
.grid[data-collapsible][data-show-initial="10"]:not(.is-expanded) > *:nth-child(n+11) { display: none; }
.grid[data-collapsible][data-show-initial="8"]:not(.is-expanded) > *:nth-child(n+9) { display: none; }
.show-more-wrap { text-align: center; margin-top: 32px; }

/* Trust strip (Brand/Service/City single pages) */
.trust-item { text-align: center; padding: 0 20px; }
.trust-item svg { color: var(--color-primary); margin-bottom: 14px; }
.trust-item h3 { font-size: 1.1rem; margin-bottom: 8px; }
.trust-item p { font-size: 0.9rem; margin: 0; }

/* Signs-you-need-this-repair callout (Service single page) */
.symptom-box { background: var(--color-primary-light); border-radius: var(--radius-md); padding: 28px; margin-top: 32px; }
.symptom-box h3 { margin-bottom: 16px; }
.symptom-list li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--color-text); }
.symptom-list li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--color-primary); font-weight: 700; }

/* Region grouping on city archive */
.region-group { margin-bottom: 48px; }
.region-group h3 { margin-bottom: 18px; }

/* ==========================================================================
   Motion: scroll-reveal, header shadow, counters, hero glow
   ========================================================================== */
.hero::before {
	content: "";
	position: absolute;
	bottom: -160px;
	right: -100px;
	width: 480px;
	height: 480px;
	background: radial-gradient(circle, rgba(1, 122, 255, .3), transparent 70%);
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}

.reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity .6s cubic-bezier(.2, .7, .3, 1), transform .6s cubic-bezier(.2, .7, .3, 1);
	transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

.grid > .reveal:nth-child(1) { --reveal-delay: 0s; }
.grid > .reveal:nth-child(2) { --reveal-delay: .06s; }
.grid > .reveal:nth-child(3) { --reveal-delay: .12s; }
.grid > .reveal:nth-child(4) { --reveal-delay: .18s; }
.grid > .reveal:nth-child(5) { --reveal-delay: .24s; }
.grid > .reveal:nth-child(6) { --reveal-delay: .3s; }
.grid > .reveal:nth-child(7) { --reveal-delay: .36s; }
.grid > .reveal:nth-child(8) { --reveal-delay: .42s; }

.site-header { transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(23, 26, 43, .08); }

.card__link { display: inline-block; transition: transform .2s ease; }
.card:hover .card__link { transform: translateX(4px); }

@keyframes puls-fade-up {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: none; }
}
.hero__content { animation: puls-fade-up .7s cubic-bezier(.2, .7, .3, 1) .05s both; }

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