/* =====================================================
   Foxton Hardcastle — Builders & Contractors
   Shared stylesheet
   ===================================================== */

:root {
  --colour-ink:        #1E2B33;
  --colour-ink-soft:   #3A4750;
  --colour-copper:     #B4632A;
  --colour-copper-lt:  #C97A3D;
  --colour-cream:      #F7F1E4;
  --colour-cream-dark: #EFE7D8;
  --colour-paper:      #FFFFFF;
  --colour-line:       #E2D9C6;
  --colour-slate:      #6B7680;
  --colour-success:    #3F6B3F;

  --font-head: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(30,43,51,0.08);
  --shadow-md: 0 8px 24px rgba(30,43,51,0.12);
  --shadow-lg: 0 16px 40px rgba(30,43,51,0.18);

  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--colour-ink);
  background: var(--colour-paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--colour-ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--colour-ink-soft); }

a { color: var(--colour-copper); text-decoration: none; }
a:hover { color: var(--colour-copper-lt); }

.container {
  max-width: var(--container);
  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: -999px;
  top: 0;
  background: var(--colour-ink);
  color: #fff;
  padding: 10px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 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: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--colour-copper);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--colour-copper-lt); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  border-color: var(--colour-cream);
  color: var(--colour-cream);
}
.btn-outline:hover { background: rgba(247,241,228,0.12); color: #fff; }
.btn-dark {
  background: var(--colour-ink);
  color: #fff;
}
.btn-dark:hover { background: #0f171c; color: #fff; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--colour-line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { height: 44px; width: auto; }
.brand-fallback-text { display: none; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--colour-ink);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--colour-copper);
  border-bottom-color: var(--colour-copper);
}
.header-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--colour-ink);
  white-space: nowrap;
}
.header-phone svg { width: 20px; height: 20px; color: var(--colour-copper); }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--colour-ink);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; color: var(--colour-ink); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--colour-cream) 0%, var(--colour-cream-dark) 100%);
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 64px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(180,99,42,0.12);
  color: var(--colour-copper);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero p.lead {
  font-size: 1.15rem;
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero-actions .btn-outline {
  border-color: var(--colour-ink);
  color: var(--colour-ink);
}
.hero-actions .btn-outline:hover {
  background: var(--colour-ink);
  color: #fff;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--colour-line);
}
.hero-trust .trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--colour-ink-soft);
}
.hero-trust svg { width: 22px; height: 22px; color: var(--colour-copper); flex-shrink: 0; }
.hero-media img { border-radius: var(--radius-lg); }

/* ---------- Section spacing/utilities ---------- */
section { padding: 72px 0; }
.section-alt { background: var(--colour-cream); }
.section-dark { background: var(--colour-ink); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #C6CDD2; }

.section-head {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head .kicker {
  display: block;
  color: var(--colour-copper);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 10px;
}
.section-head.align-left { margin-left: 0; text-align: left; }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 26px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--colour-paper);
  border: 1px solid var(--colour-line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.icon-badge {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: rgba(180,99,42,0.12);
  color: var(--colour-copper);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.icon-badge svg { width: 30px; height: 30px; }

.service-card h3 { margin-bottom: 8px; }
.service-card p { margin-bottom: 0; font-size: 0.96rem; }

/* ---------- Process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 8px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--colour-copper);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 14px;
}

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--colour-paper);
  border: 1px solid var(--colour-line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.stars { display: flex; gap: 4px; color: var(--colour-copper); margin-bottom: 14px; }
.stars svg { width: 18px; height: 18px; }
.testimonial cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-weight: 700;
  color: var(--colour-ink);
}
.testimonial .role { color: var(--colour-slate); font-weight: 500; font-size: 0.9rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--colour-ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: #C6CDD2; margin-bottom: 0; }
.cta-band .btn-primary { white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--colour-ink);
  color: #C6CDD2;
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #C6CDD2; }
.footer-grid a:hover { color: #fff; }
.footer-brand img { height: 40px; margin-bottom: 14px; }
.footer-brand p { color: #9AA6AD; font-size: 0.92rem; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.footer-contact-item svg { width: 20px; height: 20px; color: var(--colour-copper-lt); flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 0;
  font-size: 0.85rem;
  color: #8C979E;
}
.footer-bottom a { color: #8C979E; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--colour-ink);
  color: #fff;
  padding: 56px 0;
}
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: #C6CDD2; max-width: 62ch; margin-bottom: 0; }
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.88rem;
  color: #9AA6AD;
  margin-bottom: 16px;
}
.breadcrumb a { color: #C6CDD2; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Services page ---------- */
.service-detail {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--colour-line);
}
.service-detail:last-child { border-bottom: none; }
.service-detail .icon-badge { margin-bottom: 0; }
.service-detail ul { margin: 10px 0 0; padding-left: 18px; color: var(--colour-ink-soft); }
.service-detail li { margin-bottom: 4px; }

/* ---------- Areas served page ---------- */
#map {
  height: 460px;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--colour-line);
  box-shadow: var(--shadow-sm);
}
.leaflet-container { font-family: var(--font-body); border-radius: var(--radius-lg); }
.towns-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.towns-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--colour-line);
  font-weight: 600;
}
.towns-list svg { width: 16px; height: 16px; color: var(--colour-copper); flex-shrink: 0; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 44px;
  align-items: start;
}
.contact-card {
  background: var(--colour-cream);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-method {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.contact-method .icon-badge { width: 46px; height: 46px; margin-bottom: 0; }
.contact-method .icon-badge svg { width: 22px; height: 22px; }
.contact-method h3 { font-size: 1rem; margin-bottom: 2px; }
.contact-method p { margin-bottom: 0; }

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.94rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--colour-line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--colour-ink);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--colour-copper);
  box-shadow: 0 0 0 3px rgba(180,99,42,0.18);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: 0.85rem; color: var(--colour-slate); margin-top: -4px; }
.form-success {
  display: none;
  background: #E9F2E9;
  border: 1px solid #BFDABF;
  color: var(--colour-success);
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 18px;
}
.form-success.visible { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; text-align: center; }
  .cta-band .btn-primary { justify-self: center; }
}

.mobile-cta { display: none; }

@media (max-width: 760px) {
  .main-nav { position: fixed; top: 68px; right: 0; left: 0; height: calc(100vh - 68px); height: calc(100dvh - 68px); background: #fff; flex-direction: column; align-items: stretch; padding: 24px; gap: 22px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; z-index: 400; }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav ul li a { display: block; padding: 12px 4px; font-size: 1.05rem; }
  .mobile-cta { display: block; order: -1; margin-bottom: 6px; }
  .header-cta .header-phone-text { display: none; }
  .header-cta .btn-primary { display: none; }
  .header-cta { gap: 10px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .form-row { grid-template-columns: 1fr; }
  .towns-list { grid-template-columns: repeat(2, 1fr); }
  .cta-band { padding: 32px 24px; }
}

@media (max-width: 420px) {
  .towns-list { grid-template-columns: 1fr; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .hero-actions, .nav-toggle { display: none; }
}
