/*
Theme Name: Roof Space Wrap
Theme URI: https://roofspacewrap.com
Author: Roof Space Wrap
Description: Survey-led site for roof-space wrap and loft sealing, with insulation removal and loft clearance extras. Static front page, questions, survey request, and clearance page.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: roofspacewrap
*/

:root {
  --ink: #2b3034;
  --ink-soft: #5c656c;
  --teal: #2d8486;
  --teal-deep: #1c5c5e;
  --teal-soft: #e7f3f3;
  --paper: #f5f3ef;
  --paper-2: #ebe7e0;
  --line: #e3ded6;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(43, 48, 52, 0.08);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.topbar {
  background: var(--ink);
  color: #f3f1ec;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.topbar .wrap, header .wrap, .wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
}
.topbar a { color: #d7efef; text-decoration: none; }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 20px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 46px; width: auto; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { text-decoration: none; color: var(--ink); font-size: 15px; }
nav a[aria-current="page"] { color: var(--teal-deep); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost { background: transparent; border-color: #cfc8be; color: var(--ink); }
.menu-toggle { display: none; background: none; border: 0; font-size: 22px; }

.hero {
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(45,132,134,0.16), transparent 60%),
    linear-gradient(180deg, #f8f6f2 0%, #fff 70%);
  padding: 64px 0 36px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.kicker {
  color: var(--teal-deep);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 520; letter-spacing: -0.03em; line-height: 1.08; }
h1 { font-size: clamp(42px, 5vw, 68px); margin: 0 0 18px; }
h2 { font-size: clamp(32px, 4vw, 46px); margin: 0 0 14px; }
h3 { font-size: 26px; margin: 0 0 8px; }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 58ch; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-card {
  background: white;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero-card img { height: 390px; width: 100%; object-fit: cover; }
.hero-card figcaption, .caption {
  padding: 14px 16px 16px;
  color: var(--ink-soft);
  font-size: 13px;
}

.band { padding: 28px 0; border-bottom: 1px solid var(--line); }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat strong { display: block; font-family: var(--serif); font-size: 22px; font-weight: 520; }
.stat span { color: var(--ink-soft); font-size: 14px; }

section { padding: 78px 0; }
.section-head { max-width: 680px; margin-bottom: 34px; }
.muted { color: var(--ink-soft); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.card, .panel {
  background: var(--paper);
  border-radius: 22px;
  padding: 28px;
}
.card h3 { margin-bottom: 10px; }
.card ol, .panel ol { margin: 0; padding-left: 18px; }
.media-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; }
.media-grid img, .gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }
.media-grid figure, .gallery figure { margin: 0; }
.tall { min-height: 460px; }
.stack { display: grid; gap: 18px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compare article { border: 1px solid var(--line); border-radius: 22px; padding: 28px; background: white; }
.compare article.emphasis { background: var(--ink); color: white; }
.compare article.emphasis p, .compare article.emphasis li { color: #d9e4e4; }
.compare ul { padding-left: 18px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { border-top: 2px solid var(--teal); padding-top: 16px; }
.step span { color: var(--teal-deep); font-size: 13px; letter-spacing: 0.12em; }

.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin: 0; padding: 0; list-style: none; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); }

.gallery { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.gallery figure { background: var(--paper); border-radius: 22px; overflow: hidden; }
.gallery img { border-radius: 0; height: 240px; }
.gallery figcaption { padding: 12px 14px 16px; font-size: 14px; color: var(--ink-soft); }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 4px; color: var(--ink-soft); }

.survey-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  background: var(--paper);
  border-radius: 28px;
  padding: 28px;
}
form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; }
label.full { grid-column: 1 / -1; }
input, select, textarea {
  border: 1px solid #d8d2c8;
  background: white;
  border-radius: 12px;
  padding: 12px 12px;
  color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.note { font-size: 13px; color: var(--ink-soft); }
.success { display: none; background: white; border-radius: 16px; padding: 18px; border: 1px solid var(--line); }

footer { background: var(--ink); color: #eceae6; padding: 42px 0 28px; }
footer a { color: #d7efef; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.legal { margin-top: 28px; font-size: 13px; color: #b7b3ac; }

@media (max-width: 860px) {
  .hero-grid, .split, .compare, .steps, .stats, .media-grid, .gallery, .survey-panel, .foot, form, .checks {
    grid-template-columns: 1fr;
  }
  .menu-toggle { display: block; }
  nav { display: none; position: absolute; top: 78px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--line); padding: 12px 20px 18px; flex-direction: column; align-items: flex-start; }
  nav.open { display: flex; }
  .hero { padding-top: 36px; }
  .hero-card img, .tall, .gallery img { height: 240px; min-height: 0; }
  .topbar .wrap { display: none; }
}
