/* ================================================================
   What Roofer — main stylesheet
   Design direction: dark navy ground, purple accents, orange CTAs,
   condensed Kanit headings, angled section dividers.
   ================================================================ */

:root {
	--navy: #171130;
	--navy-2: #211a44;
	--navy-3: #2b2355;
	--purple: #7c3aed;
	--purple-deep: #5b21b6;
	--purple-soft: #ede7fd;
	--orange: #ff8c1a;
	--orange-deep: #e67300;
	--ink: #1d1b26;
	--muted: #5f5b72;
	--line: #e6e4ef;
	--bg: #f7f6fb;
	--white: #ffffff;
	--radius: 10px;
	--shadow: 0 10px 30px rgba(23, 17, 48, 0.12);
	--font-head: "Kanit", "Arial Narrow", sans-serif;
	--font-body: "Inter", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.15;
	color: inherit;
}

h1 { font-size: clamp(34px, 5vw, 54px); }
h2 { font-size: clamp(26px, 3.6vw, 38px); }
h3 { font-size: 20px; }

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-deep); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.kicker {
	font-family: var(--font-head);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--orange);
	margin-bottom: 8px;
}
.kicker-light { color: var(--orange); }

.section-sub { color: var(--muted); max-width: 640px; margin: 10px auto 0; }

/* ---------------- Buttons ---------------- */

.btn {
	display: inline-block;
	font-family: var(--font-head);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	padding: 13px 26px;
	font-size: 15px;
	line-height: 1.2;
	transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
	text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.btn-orange { background: var(--orange); color: #241500; }
.btn-orange:hover { background: var(--orange-deep); color: #fff; }

.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: var(--purple-deep); color: #fff; }

.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.5); }
.btn-ghost:hover { border-color: #fff; color: #fff; }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 17px 36px; font-size: 17px; }

/* ---------------- Top bar ---------------- */

.topbar { background: var(--purple-deep); color: #fff; font-size: 14px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar p { font-weight: 500; }

/* ---------------- Header / nav ---------------- */

.site-header {
	background: var(--navy);
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 50;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; padding-bottom: 14px; }

.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 32px; letter-spacing: 0.03em; }
.logo:hover { color: #fff; }
.logo em { color: var(--orange); font-style: normal; }
.logo-mark { width: 34px; height: 34px; color: var(--purple); flex: none; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { color: #d8d4ea; font-weight: 500; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: #fff; }
.main-nav a.current { color: #fff; border-bottom-color: var(--orange); }
.main-nav .nav-cta { border-bottom: 0; color: #241500; padding: 10px 20px; }
.main-nav .nav-cta:hover { color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* ---------------- Hero ---------------- */

.hero {
	position: relative;
	background:
		linear-gradient(100deg, rgba(23, 17, 48, 0.95) 0%, rgba(33, 26, 68, 0.88) 45%, rgba(23, 17, 48, 0.72) 100%),
		url("../images/flat-roofing-contractor-installing-epdm-rubber-roof-uk.jpg") center / cover,
		var(--navy-2);
	color: #fff;
	padding: 70px 0 90px;
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 46px), 50% 100%, 0 calc(100% - 46px));
}
.hero-head { margin-bottom: 24px; }
.hero-head h1 { max-width: 820px; }

.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }

.hero h1 strong { color: var(--orange); font-weight: 700; }
.hero-sub { margin-top: 14px; color: #cfc9e4; max-width: 460px; }

.hero-bullets { list-style: none; margin: 24px 0 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; max-width: 520px; }
.hero-bullets li { position: relative; padding-left: 28px; font-weight: 500; font-size: 15px; }
.hero-bullets li::before {
	content: "";
	position: absolute;
	left: 0; top: 3px;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero quick-start card */
.hero-card {
	background: var(--navy-3);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 30px 30px 26px;
	box-shadow: var(--shadow);
}
.hero-card h2 { font-size: 24px; text-align: center; margin-bottom: 4px; }
.hero-card .hero-card-sub { text-align: center; color: #b9b2d6; font-size: 14px; margin-bottom: 18px; }
.hero-card .field { margin-bottom: 14px; }
.hero-card label { display: block; font-size: 13px; font-weight: 600; color: #cfc9e4; margin-bottom: 6px; }
.hero-card select,
.hero-card input {
	width: 100%;
	background: #39306b;
	border: 1px solid #4a3f85;
	color: #fff;
	border-radius: 6px;
	padding: 12px 14px;
	font-family: var(--font-body);
	font-size: 15px;
}
.hero-card select:focus, .hero-card input:focus { outline: 2px solid var(--orange); border-color: var(--orange); }
.hero-card .btn { width: 100%; margin-top: 6px; }
.hero-card .secure-note { text-align: center; font-size: 12px; color: #a79fc9; margin-top: 12px; }

/* ---------------- Trust strip ---------------- */

.trust { padding: 70px 0 60px; background: var(--white); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 36px; }
.trust-box {
	background: var(--bg);
	border: 1px solid var(--line);
	border-top: 4px solid var(--purple);
	border-radius: var(--radius);
	padding: 26px 22px;
}
.trust-box h3 { font-size: 18px; margin-bottom: 8px; }
.trust-box p { font-size: 14.5px; color: var(--muted); }
.trust-icon {
	width: 46px; height: 46px;
	border-radius: 10px;
	background: var(--purple-soft);
	color: var(--purple);
	display: grid; place-items: center;
	margin-bottom: 14px;
}
.trust-icon svg { width: 24px; height: 24px; }

.center { text-align: center; }

/* ---------------- Services ---------------- */

.services { background: var(--bg); padding: 70px 0 80px; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 38px; }
.service-card {
	background: var(--white);
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: 0 4px 14px rgba(23, 17, 48, 0.06);
	display: flex;
	flex-direction: column;
	transition: transform 0.15s, box-shadow 0.15s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-img {
	aspect-ratio: 16 / 9;
	background: linear-gradient(120deg, var(--navy-2), var(--purple-deep));
	background-size: cover;
	background-position: center;
	position: relative;
}
.service-img::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 26px;
	background: var(--white);
	clip-path: polygon(0 100%, 100% 100%, 100% 60%, 50% 0, 0 60%);
}
.service-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-body { padding: 10px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.service-body h3 { font-size: 21px; }
.service-body p { color: var(--muted); font-size: 14.5px; flex: 1; }
.service-link { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 14px; color: var(--purple); }
.service-link::after { content: " →"; }

/* ---------------- Steps (how it works) ---------------- */

.steps { background: var(--navy); color: #fff; padding: 80px 0 90px; clip-path: polygon(0 0, 50% 36px, 100% 0, 100% 100%, 0 100%); margin-top: -1px; }
.steps .section-sub { color: #b9b2d6; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
.step-card {
	background: var(--navy-3);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 30px 26px;
	position: relative;
}
.step-num {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 48px;
	color: var(--orange);
	line-height: 1;
	margin-bottom: 12px;
}
.step-card h3 { margin-bottom: 10px; }
.step-card p { color: #cfc9e4; font-size: 14.5px; }

/* Light variant (inner pages): white section, light cards, dark text */
.steps-light { background: var(--bg); color: var(--ink); padding-top: 40px; }
.steps-light .step-card { background: var(--white); border: 1px solid var(--line); }
.steps-light .step-card p { color: var(--muted); }

/* ---------------- Why / checkmarks ---------------- */

.why { padding: 75px 0; background: var(--white); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.why-item {
	display: flex; align-items: center; gap: 12px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 15px 18px;
	font-weight: 600;
	font-size: 15px;
}
.why-item svg { width: 22px; height: 22px; color: var(--purple); flex: none; }

/* ---------------- CTA band ---------------- */

.cta-band {
	background: linear-gradient(100deg, var(--purple-deep), var(--purple));
	color: #fff;
	padding: 54px 0;
}
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 6px; }
.cta-band-sub { color: #e6ddfb; max-width: 520px; }

/* ---------------- Footer ---------------- */

.site-footer { background: var(--navy); color: #b9b2d6; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 56px 20px 40px; }
.footer-logo { font-family: var(--font-head); font-weight: 700; font-size: 24px; color: #fff; letter-spacing: 0.03em; margin-bottom: 12px; }
.footer-logo em { color: var(--orange); font-style: normal; }

/* Brand wordmark: WhatRoofer? — always renders in its canonical form
   (typeface, weight, casing, spacing), whatever context it sits in */
.brand { font-family: var(--font-head); font-weight: 700; white-space: nowrap; text-transform: none; letter-spacing: 0.02em; }
.brand-dark { color: #333; }
.brand-light { color: #fff; }
.brand .brand-o { color: var(--orange); }
.footer-heading { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; margin-bottom: 14px; font-size: 15px; }
.site-footer a { display: block; color: #b9b2d6; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 22px; padding-bottom: 26px;
	font-size: 13px; color: #8d85b3;
}

/* ---------------- Page hero (inner pages) ---------------- */

.page-hero {
	background: linear-gradient(100deg, rgba(23, 17, 48, 0.96), rgba(33, 26, 68, 0.9)), var(--navy-2);
	color: #fff;
	padding: 48px 0 60px;
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), 50% 100%, 0 calc(100% - 28px));
	text-align: center;
}
.page-hero p { color: #cfc9e4; max-width: 620px; margin: 10px auto 0; }

/* ---------------- Quote wizard ---------------- */

/* The hero's pointed bottom edge reveals the body background,
   so the quote page's body matches the section below it. */
.page-quote { background: var(--bg); }

.wizard-wrap { background: var(--bg); padding: 50px 0 80px; min-height: 60vh; }
.wizard {
	max-width: 860px;
	margin: 0 auto;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.wizard-head { background: var(--navy); color: #fff; padding: 20px 30px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.wizard-head h2 { font-size: 20px; }
.wizard-count { font-family: var(--font-head); font-weight: 600; color: var(--orange); white-space: nowrap; }

.progress { height: 6px; background: var(--line); }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--purple), var(--orange)); width: 0; transition: width 0.25s; }

.wizard-body { padding: 34px 38px 38px; }

.wstep { display: none; }
.wstep.active { display: block; animation: fadein 0.25s; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wstep h3 { font-size: 26px; margin-bottom: 4px; }
.wstep .wstep-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }

.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.tile {
	border: 2px solid var(--line);
	background: var(--white);
	border-radius: var(--radius);
	padding: 0;
	cursor: pointer;
	overflow: hidden;
	text-align: left;
	font-family: var(--font-body);
	transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
	display: flex;
	flex-direction: column;
}
.tile:hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(124, 58, 237, 0.14); }
.tile.selected { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.tile:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.tile-img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 7;
	background-color: var(--navy-2);
	background-image: linear-gradient(120deg, var(--navy-2), var(--purple-deep));
	background-size: cover;
	background-position: center;
}
.tile-label {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 12px 15px;
	font-weight: 600; font-size: 15px;
	flex: 1;
}
.tile-desc {
	display: block;
	padding: 0 15px 13px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--muted);
	margin-top: -4px;
}
.tile-label::after {
	content: "";
	width: 20px; height: 20px; flex: none;
	border: 2px solid var(--line);
	border-radius: 50%;
}
.tile.selected .tile-label::after {
	border-color: var(--purple);
	background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* contact step form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
	width: 100%;
	border: 1px solid #cfcadd;
	border-radius: 6px;
	padding: 12px 14px;
	font-family: var(--font-body);
	font-size: 15px;
	background: var(--white);
	color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--purple); border-color: var(--purple); }
.field.error input, .field.error select { border-color: #d92d20; outline-color: #d92d20; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.field.error .check-row { color: #b42318; }

.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 28px; }
.wizard-nav .spacer { flex: 1; }
.btn-back { background: transparent; color: var(--muted); border: 2px solid var(--line); }
.btn-back:hover { border-color: var(--muted); color: var(--ink); }

.wizard-error { display: none; background: #fef3f2; border: 1px solid #fecdca; color: #b42318; border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-top: 18px; }
.wizard-error.show { display: block; }

.secure-strip { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ---------------- Cost table ---------------- */

.cost-table { width: 100%; border-collapse: collapse; margin: 18px 0 10px; font-size: 15px; }
.cost-table th { background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 600; letter-spacing: 0.04em; text-align: left; padding: 12px 16px; }
.cost-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); color: #3f3c50; }
.cost-table tbody tr:nth-child(even) { background: var(--bg); }
.cost-table td:nth-child(2) { font-weight: 600; color: var(--ink); white-space: nowrap; }
.table-note { font-size: 13.5px; color: var(--muted); }

@media (max-width: 720px) {
	.cost-table { font-size: 13.5px; }
	.cost-table th, .cost-table td { padding: 9px 10px; }
	.cost-table td:nth-child(2) { white-space: normal; }
}

/* ---------------- Generic content page ---------------- */

.content-page { padding: 56px 0 70px; max-width: 820px; }
.content-page h2 { margin: 34px 0 12px; }
.content-page p, .content-page li { color: #3f3c50; margin-bottom: 12px; }
.content-page ul { padding-left: 22px; }

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
	.hero-inner { grid-template-columns: 1fr; gap: 36px; }
	.trust-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
	.service-grid, .step-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
	.topbar-inner { justify-content: center; }
	.topbar .btn { display: none; }

	.nav-toggle { display: block; }
	.main-nav {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--navy-2);
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 10px 20px 20px;
		box-shadow: 0 14px 20px rgba(0, 0, 0, 0.3);
	}
	body.nav-open .main-nav { display: flex; }
	.main-nav a { padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
	.main-nav .nav-cta { margin-top: 14px; text-align: center; }

	.hero { padding: 46px 0 70px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), 50% 100%, 0 calc(100% - 24px)); }
	.hero-bullets { grid-template-columns: 1fr; }
	.hero-card { padding: 22px 18px; }

	.service-grid, .step-grid { grid-template-columns: 1fr; }
	.tile-grid, .tile-grid.cols-2 { grid-template-columns: 1fr; }
	.tile-img { aspect-ratio: 16 / 6; }
	.form-grid { grid-template-columns: 1fr; }
	.wizard-body { padding: 24px 18px 28px; }
	.wizard-head { padding: 16px 18px; }
	.footer-grid { grid-template-columns: 1fr; gap: 28px; }
	.cta-band-inner { justify-content: center; text-align: center; }
}
