/*
Theme Name: Titan Temperature Solutions
Theme URI: https://titantemperaturesolutions.com
Author: Titan Temperature Solutions
Description: Custom theme for Titan Temperature Solutions — HVAC service and building automation controls.
Version: 1.3.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: titan
*/

/* ==========================================================================
   Tokens (colours taken from the Titan logo)
   ========================================================================== */

:root {
	--orange: #f59a1b;
	--red: #e3402c;
	--blue: #1d4fb5;
	--sky: #1fa3e0;
	--navy: #0d1b2e;
	--navy-2: #14263f;
	--ink: #17202d;
	--muted: #5a6574;
	--line: #e3e8ef;
	--soft: #f4f7fb;
	--white: #ffffff;

	--warm: linear-gradient(135deg, var(--orange), var(--red));
	--cool: linear-gradient(135deg, var(--blue), var(--sky));
	--split: linear-gradient(90deg, var(--orange) 0%, var(--red) 50%, var(--blue) 50%, var(--sky) 100%);

	--radius: 14px;
	--shadow: 0 10px 30px rgba(13, 27, 46, 0.08);
	--head: "Montserrat", system-ui, sans-serif;
	--body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--max: 1180px;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--blue);
	text-decoration: none;
}

a:hover {
	color: var(--red);
}

h1,
h2,
h3 {
	font-family: var(--head);
	line-height: 1.2;
	color: var(--navy);
	margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

p {
	margin: 0 0 1em;
}

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

.icon {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
}

.screen-reader-text,
.hp {
	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;
	z-index: 100;
	background: var(--navy);
	color: var(--white);
	padding: 10px 16px;
}
.skip-link:focus {
	left: 10px;
}

:focus-visible {
	outline: 3px solid var(--sky);
	outline-offset: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.85em 1.5em;
	border-radius: 999px;
	border: 2px solid transparent;
	font-family: var(--head);
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.btn:hover {
	transform: translateY(-1px);
}

.btn-primary {
	background: var(--warm);
	color: var(--white);
	box-shadow: 0 8px 20px rgba(227, 64, 44, 0.3);
}
.btn-primary:hover {
	color: var(--white);
	box-shadow: 0 10px 24px rgba(227, 64, 44, 0.4);
}

.btn-ghost {
	border-color: rgba(255, 255, 255, 0.35);
	color: var(--white);
}
.btn-ghost:hover {
	border-color: var(--white);
	color: var(--white);
}

.btn-light {
	background: var(--white);
	color: var(--navy);
}
.btn-light:hover {
	color: var(--blue);
}

.btn-outline-light {
	border-color: rgba(255, 255, 255, 0.6);
	color: var(--white);
}
.btn-outline-light:hover {
	border-color: var(--white);
	color: var(--white);
}

/* ==========================================================================
   Top bar + header
   ========================================================================== */

.topbar {
	background: var(--navy);
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.85rem;
}
.topbar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding-top: 8px;
	padding-bottom: 8px;
}
.topbar a {
	color: rgba(255, 255, 255, 0.85);
}
.topbar a:hover {
	color: var(--white);
}
.topbar-item,
.topbar-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}
.topbar-links {
	display: flex;
	gap: 1.4rem;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}
.site-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 3px;
	background: var(--split);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 78px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.brand-icon {
	width: 52px;
	height: 52px;
}
.brand-words {
	width: 150px;
	height: auto;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 1.75rem;
}
.site-nav .menu {
	display: flex;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-nav .menu a {
	font-family: var(--head);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--navy);
	padding: 6px 0;
	border-bottom: 2px solid transparent;
}
.site-nav .menu a:hover,
.site-nav .menu .current-menu-item > a,
.site-nav .menu .current_page_item > a {
	color: var(--red);
	border-bottom-color: var(--red);
}

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--white);
	cursor: pointer;
	position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
	position: absolute;
	left: 11px;
	width: 20px;
	height: 2px;
	background: var(--navy);
	content: "";
	transition: transform 0.2s, top 0.2s, opacity 0.2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -6px; }
.nav-toggle-bar::after { left: 0; top: 6px; }

.nav-open .nav-toggle-bar { background: transparent; }
.nav-open .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
	position: relative;
	overflow: hidden;
	color: var(--white);
	background:
		radial-gradient(circle at 0% 100%, rgba(245, 154, 27, 0.28), transparent 45%),
		radial-gradient(circle at 100% 0%, rgba(31, 163, 224, 0.3), transparent 50%),
		linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
}
.hero-inner {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	align-items: center;
	gap: 3rem;
	padding-top: 90px;
	padding-bottom: 100px;
}
.hero h1 {
	color: var(--white);
}
.hero .lead {
	font-size: 1.15rem;
	color: rgba(255, 255, 255, 0.82);
	max-width: 38em;
}
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin: 1.8rem 0 2rem;
}
.hero-points {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.6rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.8);
}
.hero-points li::before {
	content: "✓";
	color: var(--sky);
	font-weight: 700;
	margin-right: 0.45em;
}
.hero-art {
	display: flex;
	justify-content: center;
}
.hero-art img {
	width: min(360px, 80%);
	filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.45));
}

.eyebrow {
	display: inline-block;
	font-family: var(--head);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--red);
	margin-bottom: 0.9rem;
}
.hero .eyebrow {
	color: var(--orange);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
	padding: 84px 0;
}
.section-soft {
	background: var(--soft);
}
.section-head {
	max-width: 640px;
	margin: 0 auto 3rem;
	text-align: center;
}
.section-head p {
	color: var(--muted);
}
.section-more {
	text-align: center;
	margin-top: 2.5rem;
}
.link-arrow {
	font-family: var(--head);
	font-weight: 700;
}

/* Service cards */
.card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.4rem;
}
.card {
	position: relative;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.8rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s, box-shadow 0.2s;
	overflow: hidden;
}
.card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--warm);
}
.card-cool::before {
	background: var(--cool);
}
.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(13, 27, 46, 0.12);
}
.card p {
	color: var(--muted);
	margin: 0;
}
a.card {
	display: block;
	color: inherit;
}
a.card:hover {
	color: inherit;
}
.card-more {
	display: inline-block;
	margin-top: 1rem;
	font-family: var(--head);
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--red);
}
.card-cool .card-more {
	color: var(--blue);
}
.services-cards {
	margin-top: 3rem;
}

/* Controls platforms strip */
.platforms {
	background: var(--navy);
	color: var(--white);
	padding: 36px 0;
}
.platforms-inner {
	display: flex;
	align-items: center;
	gap: 2rem;
	flex-wrap: wrap;
	justify-content: center;
}
.platforms-label {
	font-family: var(--head);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--orange);
}
.platform-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.9rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.platform {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 150px;
	padding: 0.8rem 1.3rem;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
}
.platform strong {
	font-family: var(--head);
	font-weight: 800;
	font-size: 1.1rem;
	letter-spacing: 0.02em;
}
.platform span {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.65);
}

/* Breadcrumb on service pages */
.breadcrumb {
	display: flex;
	gap: 0.5rem;
	font-size: 0.85rem;
	margin-bottom: 0.6rem;
	color: rgba(255, 255, 255, 0.7);
}
.breadcrumb a {
	color: var(--orange);
}
.breadcrumb a:hover {
	color: var(--white);
}

/* Call Now bar pinned to the bottom on phones */
.mobile-cta {
	display: none;
}
@media (max-width: 860px) {
	.mobile-cta {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		display: grid;
		grid-template-columns: 1fr 1fr;
		box-shadow: 0 -6px 20px rgba(13, 27, 46, 0.2);
		padding-bottom: env(safe-area-inset-bottom);
		background: var(--navy);
	}
	.mobile-cta a {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.5em;
		min-height: 58px;
		font-family: var(--head);
		font-weight: 700;
		font-size: 1rem;
		color: var(--white);
	}
	.mobile-cta a:hover {
		color: var(--white);
	}
	.mobile-cta-call {
		background: var(--warm);
	}
	.mobile-cta-quote {
		background: var(--cool);
	}
	.mobile-cta-single {
		grid-template-columns: 1fr;
	}
	.mobile-cta .icon {
		font-size: 1.2em;
	}
	body {
		padding-bottom: calc(58px + env(safe-area-inset-bottom));
	}
}
.card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	margin-bottom: 1.1rem;
	font-size: 26px;
	color: var(--white);
	background: var(--warm);
}
.card-cool .card-icon {
	background: var(--cool);
}

/* Why Titan */
.split {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 3.5rem;
	align-items: center;
}
.split p {
	color: var(--muted);
}
.checks {
	list-style: none;
	padding: 0;
	margin: 1.5rem 0 0;
}
.checks li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.8rem;
}
.checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.2rem;
	height: 1.2rem;
	border-radius: 50%;
	background: var(--cool);
}
.checks li::after {
	content: "";
	position: absolute;
	left: 0.42rem;
	top: 0.52em;
	width: 0.35rem;
	height: 0.6rem;
	border: solid var(--white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.stat-panel {
	display: grid;
	gap: 1rem;
}
.stat {
	display: flex;
	flex-direction: column;
	background: var(--white);
	border-radius: var(--radius);
	padding: 1.4rem 1.6rem;
	box-shadow: var(--shadow);
	border-left: 5px solid var(--red);
}
.stat:nth-child(2) {
	border-left-color: var(--blue);
}
.stat:nth-child(3) {
	border-left-color: var(--sky);
}
.stat strong {
	font-family: var(--head);
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--navy);
}
.stat span {
	color: var(--muted);
}

/* Process steps */
.steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.step {
	padding: 1.6rem;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: var(--white);
}
.step p {
	color: var(--muted);
	margin: 0;
	font-size: 0.95rem;
}
.step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	margin-bottom: 1rem;
	font-family: var(--head);
	font-weight: 800;
	color: var(--white);
	background: var(--split);
	background-size: 100% 100%;
}

/* ==========================================================================
   Inner pages
   ========================================================================== */

.page-hero {
	color: var(--white);
	padding: 64px 0 56px;
	background:
		radial-gradient(circle at 0% 100%, rgba(245, 154, 27, 0.25), transparent 45%),
		radial-gradient(circle at 100% 0%, rgba(31, 163, 224, 0.28), transparent 50%),
		linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
}
.page-hero h1 {
	color: var(--white);
	margin: 0;
}

.entry-content {
	max-width: 820px;
}
.contact-grid .entry-content {
	max-width: none;
}
.entry-content h2 {
	margin-top: 1.8em;
	padding-left: 0.8rem;
	border-left: 4px solid var(--red);
}
.entry-content h2:first-child {
	margin-top: 0;
}
.entry-content ul {
	padding-left: 1.2em;
}
.entry-content li {
	margin-bottom: 0.4em;
}
.entry-content li::marker {
	color: var(--blue);
}

/* Contact */
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 3rem;
	align-items: start;
}
.contact-list {
	list-style: none;
	padding: 0;
	margin: 1.5rem 0 0;
	display: grid;
	gap: 1rem;
}
.contact-list li {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 1rem 1.2rem;
	background: var(--soft);
	border-radius: var(--radius);
}
.contact-list .icon {
	font-size: 22px;
	color: var(--red);
	margin-top: 3px;
}
.contact-list div {
	display: flex;
	flex-direction: column;
}
.contact-list strong {
	font-family: var(--head);
	color: var(--navy);
}

.form-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 2rem;
	scroll-margin-top: 110px;
}
.form-card h2 {
	font-size: 1.5rem;
}
.contact-form {
	display: grid;
	gap: 1rem;
}
.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
.contact-form label {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--navy);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
	font: inherit;
	font-weight: 400;
	padding: 0.75em 0.9em;
	border: 1px solid #cdd5e0;
	border-radius: 10px;
	background: var(--white);
	color: var(--ink);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(29, 79, 181, 0.15);
}
.contact-form .btn {
	justify-self: start;
}

.notice {
	padding: 0.8rem 1rem;
	border-radius: 10px;
	font-weight: 500;
}
.notice-ok {
	background: #e7f6ee;
	color: #146c3b;
}
.notice-err {
	background: #fdecea;
	color: #a52a1c;
}

.post-summary {
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--line);
}

/* ==========================================================================
   CTA band + footer
   ========================================================================== */

.cta-band {
	background: linear-gradient(110deg, var(--red) 0%, #b8355f 45%, var(--blue) 100%);
	color: var(--white);
	padding: 56px 0;
}
.cta-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
}
.cta-band h2 {
	color: var(--white);
	margin-bottom: 0.3em;
}
.cta-band p {
	margin: 0;
	color: rgba(255, 255, 255, 0.88);
}
.cta-actions {
	display: flex;
	gap: 0.8rem;
	flex-wrap: wrap;
}

.site-footer {
	background: var(--navy);
	color: rgba(255, 255, 255, 0.72);
	padding-top: 64px;
	font-size: 0.95rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1.3fr;
	gap: 2.5rem;
	padding-bottom: 48px;
}
.site-footer h3 {
	color: var(--white);
	font-size: 1rem;
	margin-bottom: 1rem;
}
.site-footer a {
	color: rgba(255, 255, 255, 0.82);
}
.site-footer a:hover {
	color: var(--white);
}
/* The wordmark is black; make it white on the dark footer */
.site-footer .brand-words {
	filter: brightness(0) invert(1);
}
.footer-brand p {
	margin-top: 1rem;
	max-width: 30em;
}
.footer-links,
.footer-contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.6rem;
}
.footer-contact li {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
}
.footer-contact .icon {
	margin-top: 0.3em;
	color: var(--sky);
}
.form-note {
	margin: 0;
	font-size: 0.82rem;
	color: var(--muted);
}
.footer-bottom {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 20px;
	padding-bottom: 28px;
	font-size: 0.85rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
	.card-grid { grid-template-columns: repeat(2, 1fr); }
	.steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
	.nav-toggle { display: block; }

	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0.5rem 20px 1.25rem;
		background: var(--white);
		border-bottom: 1px solid var(--line);
		box-shadow: 0 16px 30px rgba(13, 27, 46, 0.1);
		display: none;
	}
	.site-nav.is-open { display: flex; }
	.site-nav .menu {
		flex-direction: column;
		gap: 0;
	}
	.site-nav .menu a {
		display: block;
		padding: 0.8rem 0;
		border-bottom: 1px solid var(--line);
	}
	.nav-cta { margin-top: 1rem; }

	.hero-inner,
	.split,
	.contact-grid,
	.footer-grid {
		grid-template-columns: 1fr;
	}
	.hero-inner {
		padding-top: 60px;
		padding-bottom: 70px;
		text-align: left;
	}
	.hero-art { display: none; }
	.section { padding: 64px 0; }
}

@media (max-width: 600px) {
	body { font-size: 16px; }
	.topbar-item { display: none; }
	.topbar-inner { justify-content: center; }
	.topbar-links { gap: 1rem; font-size: 0.8rem; }
	.topbar-links .topbar-email { display: none; }
	.topbar-area-only .topbar-item { display: inline-flex; }
	.card-grid,
	.steps,
	.form-row { grid-template-columns: 1fr; }
	.brand-icon { width: 44px; height: 44px; }
	.brand-words { width: 120px; }
	.form-card { padding: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* Service area (home page) */
.area-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: 24px;
	max-width: 900px;
	margin: 0 auto;
}
.area-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px 26px;
	box-shadow: var(--shadow);
}
.area-card h3 {
	display: flex;
	align-items: center;
	gap: 0.45em;
	margin: 0 0 14px;
}
.area-card h3 .icon {
	color: var(--orange);
}
.area-cities {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.area-cities li {
	background: var(--soft);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 0.9rem;
}
.area-note {
	text-align: center;
	margin: 28px 0 0;
}
.contact-cities {
	display: block;
	font-size: 0.85rem;
	opacity: 0.75;
	margin-top: 4px;
}
