/* ==========================================================================
   Foundry Trades Template — main stylesheet
   One file, plain CSS, no dependencies. Styled to the wireframe brief supplied
   alongside the scope brief — NOT to the Equity Release sites' look, which is
   only the funnel/business-model reference.
   Sections: 1. Tokens  2. Base  3. Layout  4. Buttons  5. Header & nav
   6. Hero  7. Trust strip  8. Services  9. About  10. Areas + map
   11. Reviews  12. CTA banner  13. Forms  14. Footer  15. Sticky mobile bar
   ========================================================================== */

/* 1. Tokens (trade-neutral placeholders, not a final brand palette — a real
      client's brand colours are a later "theme" config block, not built yet) */
:root {
  --brand-700: #154273;
  --brand-800: #113459;
  --brand-900: #0d2c4d;
  --ink: #1c2226;
  --ink-soft: #4a545c;
  --paper: #ffffff;
  --cream: #f6f8fa;
  --line: #dde3e8;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 10px;
  --radius-lg: 14px;
  --max: 1180px;
  --shadow: 0 1px 2px rgba(13,44,77,.06), 0 8px 24px rgba(13,44,77,.08);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--brand-900); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
a { color: var(--brand-700); }
a:hover { color: var(--brand-900); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand-900); color: #fff; padding: .75em 1em; z-index: 100; }
.skip-link:focus { left: 0; }

/* 3. Layout ------------------------------------------------------------------ */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.eyebrow { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--brand-700); margin-bottom: .5em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-heading h2 { margin-bottom: 0; }
.section-heading-link { font-weight: 700; white-space: nowrap; text-decoration: none; }

/* 4. Buttons ------------------------------------------------------------------ */
.btn { display: inline-block; padding: .85em 1.5em; border-radius: var(--radius); font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn--primary { background: var(--brand-700); color: #fff; }
.btn--primary:hover { background: var(--brand-900); color: #fff; }
.btn--ghost { border-color: var(--brand-700); color: var(--brand-700); }
.btn--ghost:hover { background: var(--cream); }
.btn--on-dark.btn--ghost { border-color: #fff; color: #fff; }
.btn--on-dark.btn--ghost:hover { background: rgba(255,255,255,.12); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* 5. Header & nav ------------------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; padding: .85rem 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-logo { flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.1rem; color: var(--brand-900); }
.brand-tagline { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.header-call { margin-left: auto; text-decoration: none; text-align: right; }
.header-call-label { display: block; font-size: .72rem; color: var(--ink-soft); }
.header-call-number { display: block; font-weight: 800; color: var(--brand-700); font-size: 1.05rem; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 22px; height: 2px; background: var(--brand-900); position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.site-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-weight: 600; color: var(--ink); white-space: nowrap; }
.site-nav a[aria-current="page"] { color: var(--brand-700); }

/* 6. Hero / page banner ------------------------------------------------------------------ */
.hero, .page-banner { background: var(--cream); padding: 3rem 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; }
.hero-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* 7. Trust strip ------------------------------------------------------------------ */
/* Icons are inline <svg> (currentColor), not emoji — matches the wireframe's plain blue line-icon look.
   The 4th ("Quality Workmanship") is a filled circle badge in the wireframe, the other three are plain. */
.trust-strip { border-bottom: 1px solid var(--line); background: var(--paper); }
.trust-strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding: 1.75rem 0; }
.trust-item { display: flex; flex-direction: column; gap: .15rem; }
.trust-item-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--brand-700); margin-bottom: .4rem; }
.trust-item-icon svg { width: 100%; height: 100%; }
.trust-item-icon--badge { background: var(--brand-700); border-radius: 50%; }
.trust-item-icon--badge svg { width: 55%; height: 55%; }
.trust-item strong { color: var(--brand-900); }
.trust-item span:last-child { color: var(--ink-soft); font-size: .9rem; }

/* 8. Services ------------------------------------------------------------------ */
/* Single row on desktop (up to 6 tiles: up to 5 core services + the conditional emergency-callout tile),
   matching the wireframe's compact icon-strip look rather than a bordered card grid. */
.services-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.25rem; }
.service-card h3 { font-size: 1.05rem; margin-bottom: .35em; }
.service-card p { color: var(--ink-soft); font-size: .9rem; }
.service-card-price { font-weight: 700; color: var(--brand-700); font-size: .9rem; }
.service-card-link { font-weight: 700; text-decoration: none; font-size: .9rem; }
.icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--brand-700); margin-bottom: .75rem; }
.icon-badge svg { width: 22px; height: 22px; }

/* 9. About ------------------------------------------------------------------ */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 2.5rem; align-items: start; }
.about-media img { border-radius: var(--radius-lg); }
.about-list { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .5rem; }
.about-list li { padding-left: 1.6em; position: relative; }
.about-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand-700); font-weight: 700; }

/* 10. Areas + map ------------------------------------------------------------------ */
.areas-section { background: var(--cream); scroll-margin-top: 4rem; } /* so #areas links (contact page) don't land under the sticky header */
.areas-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; }
.areas-list { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.areas-list li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .3em .9em; font-size: .9rem; }
.map-placeholder { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); background: repeating-linear-gradient(45deg, var(--line), var(--line) 10px, #eef2f5 10px, #eef2f5 20px); display: flex; align-items: center; justify-content: center; border: 1px dashed #aab6c0; }
.map-placeholder span { background: var(--brand-700); color: #fff; padding: .4em 1em; border-radius: 999px; font-weight: 700; }
.map-image img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* 11. Reviews ------------------------------------------------------------------ */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.review-card { background: var(--cream); border-radius: var(--radius-lg); padding: 1.5rem; }
.review-card-quote { font-style: italic; }
.review-card-author { font-weight: 700; color: var(--brand-900); margin: 0; }

/* 12. CTA banner ------------------------------------------------------------------ */
.cta-banner { background: var(--brand-900); color: #fff; padding: 2.75rem 0; }
.cta-banner h2 { color: #fff; margin-bottom: .25em; }
.cta-banner p { color: #cfe0ef; margin-bottom: 0; }
.cta-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }

/* 13. Forms ------------------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
.form-card, .panel { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.panel + .panel { margin-top: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35em; }
.field .hint { display: block; font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
.field .req { color: #b3261e; }
input, textarea { width: 100%; padding: .7em .8em; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
textarea { min-height: 7rem; }
.hp { position: absolute; left: -9999px; }
.form-status { color: #b3261e; font-weight: 600; min-height: 1.4em; }
.form-note { font-size: .85rem; color: var(--ink-soft); margin-top: .75rem; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: .9rem; }
.contact-list small { display: block; color: var(--ink-soft); font-size: .8rem; }
.thanks { text-align: center; max-width: 34rem; }
.thanks-tick { width: 3.5rem; height: 3.5rem; line-height: 3.5rem; border-radius: 50%; background: var(--brand-700); color: #fff; font-size: 1.5rem; margin: 0 auto 1rem; }

/* 14. Footer ------------------------------------------------------------------ */
.site-footer { background: var(--brand-900); color: #dce6f0; padding: 3rem 0 2rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 2rem; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: #b7c7d6; font-size: .95rem; }
.footer-grid h2 { color: #fff; font-size: 1rem; margin-bottom: .75em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.social-icons { display: flex; gap: .6rem; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; }
.social-icon svg { width: 16px; height: 16px; }
.legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; color: #b7c7d6; }

/* 15. Sticky mobile call/WhatsApp bar (mobile only) ------------------------------- */
.sticky-bar { display: none; }

/* 16. Responsive ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-strip-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .header-call { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; }
  .site-nav a { display: block; padding: .6rem 0; }

  .hero-grid, .about-grid, .areas-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 220px; }
  .services-grid, .reviews-grid { grid-template-columns: 1fr; }
  .contact-grid, .service-detail { grid-template-columns: 1fr; }
  .cta-banner-inner { text-align: center; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }

  /* Sticky mobile Call/WhatsApp bar (brief §4: phone-first, sticky call button on mobile) */
  .sticky-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; box-shadow: 0 -2px 12px rgba(13,44,77,.15); }
  .sticky-bar-btn { flex: 1; text-align: center; padding: .9rem; font-weight: 700; text-decoration: none; color: #fff; }
  .sticky-bar-call { background: var(--brand-700); }
  .sticky-bar-whatsapp { background: #25d366; }
  /* room for the sticky bar so it never covers the footer's own content */
  .site-footer { padding-bottom: calc(2rem + 52px); }
}
