/* I Got You Pal - shared styles for all trade landing pages */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f1efec;
  --text: #1c1917;
  --muted: #57534e;
  --line: #e4e1dc;
  --field-line: #8a837c;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --on-accent: #ffffff;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgb(68 52 36 / 0.06), 0 16px 40px -16px rgb(68 52 36 / 0.22);
  --radius: 10px;
  --max: 1180px;
  --logo-soft: #fbd5b8;
  color-scheme: light dark;
}

/* Dark theme: follows the device unless the visitor picks one with the header switch (js/theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151311;
    --surface: #1e1b18;
    --surface-2: #24211e;
    --text: #f2efeb;
    --muted: #b4ada5;
    --line: #38332e;
    --field-line: #77706a;
    --accent: #fb8a3c;
    --accent-hover: #fdab72;
    --on-accent: #1c1917;
    --danger: #f87171;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.65);
    --logo-soft: #4a2c18;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #151311;
  --surface: #1e1b18;
  --surface-2: #24211e;
  --text: #f2efeb;
  --muted: #b4ada5;
  --line: #38332e;
  --field-line: #77706a;
  --accent: #fb8a3c;
  --accent-hover: #fdab72;
  --on-accent: #1c1917;
  --danger: #f87171;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.65);
  --logo-soft: #4a2c18;
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

p a,
.checks a {
  color: var(--accent);
  font-weight: 600;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.logo-text span {
  color: var(--accent);
}

/* Logo mark: a long bar laid over a short bar and a block, like a course of bricks. */
.logo-mark {
  flex: none;
  width: 30px;
  height: 30px;
}

.lm-ink {
  fill: var(--text);
}

.lm-accent {
  fill: var(--accent);
}

.lm-soft {
  fill: var(--logo-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav .nav-link {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.site-nav .nav-link:hover {
  color: var(--text);
}

/* Light/dark switch: shows a moon in light mode and a sun in dark mode. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--surface-2);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.9375rem;
}

/* Glow button: cursor-following highlight (position set by js/button-glow.js),
   slight swell and an arrow that turns to point down on hover. */

.btn-glow {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  gap: 6px;
  transition: background-color 0.2s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60px circle at var(--x, 50%) var(--y, 50%), rgb(255 255 255 / 0.3), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.btn-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-sm .btn-arrow {
  width: 16px;
  height: 16px;
}

/* Default: the arrow turns to point down at the section the button scrolls to. */
.btn-glow:hover .btn-arrow,
.btn-glow:focus-visible .btn-arrow {
  transform: rotate(90deg);
}

/* Buttons below their target turn the arrow up instead. */
.btn-glow-up:hover .btn-arrow,
.btn-glow-up:focus-visible .btn-arrow {
  transform: rotate(-90deg);
}

/* Submit buttons don't scroll anywhere, so the arrow nudges forward. */
.btn-glow-send:hover .btn-arrow,
.btn-glow-send:focus-visible .btn-arrow {
  transform: translateX(4px);
}

@media (hover: hover) {
  .btn-glow:hover {
    background: color-mix(in srgb, var(--accent) 92%, white);
    transform: scale(1.05);
  }

  .btn-glow:hover::before {
    opacity: 1;
  }

  .btn-glow:active {
    transform: scale(1.02);
  }

  /* Full-width form buttons swell less so they stay inside the card. */
  .btn-glow-send:hover {
    transform: scale(1.02);
  }

  .btn-glow-send:active {
    transform: scale(1.01);
  }
}

/* Hero */

.hero {
  padding: 40px 0 64px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

.breadcrumbs {
  margin: 0 0 24px;
  font-size: 0.875rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
}

h1 {
  margin: 0 0 20px;
  max-width: 17ch;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0 0 28px;
  max-width: 44ch;
  font-size: 1.1875rem;
  color: var(--muted);
}

.hero-cta {
  display: none;
}

.hero-home .wrap {
  grid-template-columns: 1fr;
}

/* Quote form */

.quote-form {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quote-form h2 {
  margin: 0 0 4px;
  font-size: 1.375rem;
}

.quote-form .form-intro {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.field .hint {
  font-size: 0.8125rem;
  color: var(--muted);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 12px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  font: inherit;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: var(--danger);
}

.quote-form .btn {
  width: 100%;
  margin-top: 4px;
  padding: 14px 22px;
}

.form-note {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Sections */

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--surface-2);
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-lede {
  margin: 0 0 36px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Jobs */

.jobs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
}

.job {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.job h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}

.job p {
  margin: 0;
  color: var(--muted);
}

/* Costs */

.costs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.cost {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cost h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.cost .price {
  margin: 6px 0 8px;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cost p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.small-print {
  margin: 20px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

/* Before you hire */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}

.split .section-lede {
  margin-bottom: 0;
}

.checks {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 36px;
  font-size: 1.0625rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
}

.checks li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 7px;
  width: 6px;
  height: 11px;
  border: solid var(--on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* FAQs */

.faq {
  max-width: 820px;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 20px 44px 20px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 14px;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 22px;
  max-width: 70ch;
  color: var(--muted);
}

/* Closing call to action */

.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.cta-band h2 {
  margin: 0;
}

.cta-band p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* Related trades */

.related h2 {
  font-size: 1.375rem;
  margin-bottom: 16px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pills a {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.pills a:hover {
  border-color: var(--accent);
}

.pills span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

/* Directory layout: compact hero, listings beside a quote form */

.hero-compact {
  padding: 40px 0 0;
}

.hero-compact .wrap {
  display: block;
}

.hero-compact h1 {
  max-width: none;
  margin-bottom: 12px;
}

.hero-compact .lede {
  max-width: 60ch;
  margin-bottom: 0;
}

.hero-compact .btn {
  margin-top: 24px;
}

/* No quote form beside the listings: let them use the full width. */
.directory-layout.no-aside {
  grid-template-columns: minmax(0, 1fr);
}

.directory {
  padding-top: 40px;
}

.directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 40px;
  align-items: start;
}

/* Spans both columns so the first listing cards and the form start level. */
.directory-head {
  grid-column: 1 / -1;
  margin-bottom: -16px;
}

.directory-head h2 {
  margin: 0;
  font-size: 1.375rem;
}

.listing-disclaimer {
  margin: 0 0 16px;
}

.directory .listing-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Keep the form in view while browsing, but only when it fits the window. */
@media (min-height: 900px) {
  .directory-aside {
    position: sticky;
    top: 24px;
  }
}

/* Business listings on location pages */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.listing {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Hover: lift, accent border and a cursor-following tint (position set by js/button-glow.js). */
.listing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.25s ease;
}

.listing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(240px circle at var(--x, 50%) var(--y, 50%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.listing:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

@media (hover: hover) {
  .listing:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    box-shadow: var(--shadow);
  }

  .listing:hover::before {
    opacity: 1;
  }
}

.listing h3 {
  margin: 0;
  font-size: 1.1875rem;
}

.listing p {
  margin: 0 0 12px;
  color: var(--muted);
}

.listing .listing-area {
  margin: 2px 0 12px;
  font-size: 0.9375rem;
}

.listing-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: auto !important;
  padding-top: 4px;
}

.listing-contact a {
  font-weight: 700;
}

.listing .listing-source {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}

.listing-source a {
  color: inherit;
  font-weight: 400;
}

/* Areas covered on location pages */

.area-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
}

.area-grid h3 {
  margin: 0 0 14px;
  font-size: 1.0625rem;
}

/* Town and city links, grouped by region */

.region-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 36px 40px;
  margin-top: 32px;
}

.region-groups h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.region-groups ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.region-groups a {
  color: var(--muted);
  text-decoration: none;
}

.region-groups a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Home page trade directory */

.trade-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trade-list a {
  display: block;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.trade-list h3 {
  margin: 0 0 4px;
  font-size: 1.1875rem;
  transition: color 0.2s ease;
}

.trade-list a:hover h3 {
  color: var(--accent);
}

.trade-list p {
  margin: 0;
  color: var(--muted);
}

/* Footer */

.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer p {
  margin: 0 0 6px;
  max-width: 80ch;
}

/* Cookie banner (js/consent.js) */

.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: 440px;
  padding: 18px 44px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.9375rem;
}

.cookie-banner p {
  margin: 0 0 14px;
  color: var(--muted);
}

.cookie-banner strong {
  color: var(--text);
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

.btn-quiet {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--field-line);
}

.btn-quiet:hover {
  background: var(--surface-2);
}

.cookie-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Privacy page */

.prose {
  max-width: 70ch;
}

.prose h2 {
  margin-top: 40px;
  font-size: 1.375rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose td code {
  white-space: nowrap;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

/* Responsive */

@media (max-width: 900px) {
  .hero .wrap,
  .split,
  .area-grid,
  .directory-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-cta {
    display: inline-flex;
  }

  .costs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .section {
    padding: 56px 0;
  }

  .jobs,
  .trade-list,
  .listing-grid {
    grid-template-columns: 1fr;
  }

  .quote-form {
    padding: 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .site-nav .nav-link {
    display: none;
  }

  .cookie-banner {
    right: 16px;
    left: 16px;
    bottom: 16px;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .site-nav {
    gap: 8px;
  }

  .site-header .btn-arrow {
    display: none;
  }

  .costs {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
