/* Optimised Tradies - shared "Ink & Lime" header, mobile menu, footer.
   Everything is namespaced v5- so it cannot collide with page-level CSS.
   Loaded by index.html and by every secondary page (after the page's inline <style>). */

:root {
  --v5-paper: #F4F5F2;
  --v5-paper-2: #EBEDE8;
  --v5-ink: #0F1216;
  --v5-slate: #1B2129;
  --v5-steel: #5B6470;
  --v5-line: #D9DCD6;
  --v5-lime: #C8FF00;
  --v5-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --v5-body: "Inter", system-ui, -apple-system, sans-serif;
  --v5-nav-h: 72px;
  --v5-gutter: clamp(16px, 4vw, 40px);
  --v5-max: 1200px;
}

.v5-nav, .v5-menu, .v5-footer {
  font-family: var(--v5-body); font-size: 17px; line-height: 1.55; font-weight: 400; letter-spacing: normal;
  color: var(--v5-ink); -webkit-text-size-adjust: 100%;
}
.v5-nav *, .v5-menu *, .v5-footer * { box-sizing: border-box; }
.v5-nav a, .v5-menu a, .v5-footer a { text-decoration: none; color: inherit; }
.v5-nav ul, .v5-menu ul, .v5-footer ul { list-style: none; margin: 0; padding: 0; }
.v5-nav :focus-visible, .v5-menu :focus-visible, .v5-footer :focus-visible { outline: 3px solid var(--v5-ink); outline-offset: 3px; }

.v5-wrap { width: min(var(--v5-max), 100% - 2 * var(--v5-gutter)); margin-inline: auto; }

/* Buttons (header + menu only; pages keep their own button styles) */
.v5-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 6px; border: 1.5px solid transparent;
  font-family: var(--v5-body); font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease; white-space: nowrap;
}
.v5-btn:active { transform: translateY(1px); }
.v5-btn-primary { background: var(--v5-ink); color: var(--v5-lime) !important; }
.v5-btn-primary:hover { background: #000; }
.v5-btn-secondary { border-color: var(--v5-ink); color: var(--v5-ink) !important; background: transparent; }
.v5-btn-secondary:hover { background: var(--v5-ink); color: var(--v5-paper) !important; }

/* Header */
.v5-nav {
  position: sticky; top: 0; z-index: 900; height: var(--v5-nav-h);
  background: var(--v5-paper);
  border-bottom: 1px solid var(--v5-line);
}
.v5-nav .v5-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.v5-logo { display: flex; align-items: center; gap: 10px; }
.v5-logo svg { width: 34px; height: 34px; flex: none; }
.v5-logo span { font-family: var(--v5-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; line-height: .95; display: grid; }
.v5-logo small { font-weight: 700; font-size: .78em; letter-spacing: .04em; }
.v5-links { display: flex; gap: clamp(16px, 2vw, 28px); }
.v5-links a { font-weight: 500; font-size: .95rem; color: var(--v5-steel); }
.v5-links a:hover, .v5-links a[aria-current="page"] { color: var(--v5-ink); }
/* Services dropdown (desktop) */
.v5-dd { position: relative; }
.v5-dd-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--v5-body); font-weight: 500; font-size: .95rem; line-height: inherit; color: var(--v5-steel);
}
.v5-dd-btn::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease;
}
.v5-dd-btn:hover, .v5-dd.open > .v5-dd-btn, .v5-dd:has([aria-current="page"]) > .v5-dd-btn { color: var(--v5-ink); }
.v5-dd.open > .v5-dd-btn::after { transform: rotate(-135deg); margin-top: 3px; }
.v5-dd-menu {
  position: absolute; top: calc(100% + 26px); left: -14px; z-index: 5; min-width: 260px; padding: 8px; display: grid; gap: 2px;
  background: var(--v5-paper); border: 1px solid var(--v5-line); border-radius: 10px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 22px 44px -18px rgba(15,18,22,.38);
  visibility: hidden; opacity: 0; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.v5-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 28px; }
.v5-dd.open .v5-dd-menu { visibility: visible; opacity: 1; transform: none; transition: opacity .15s ease, transform .15s ease; }
@media (hover: hover) {
  .v5-dd:hover .v5-dd-menu { visibility: visible; opacity: 1; transform: none; transition: opacity .15s ease, transform .15s ease; }
  .v5-dd:hover > .v5-dd-btn { color: var(--v5-ink); }
}
.v5-links .v5-dd-menu a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 6px;
  font-weight: 500; font-size: .95rem; color: var(--v5-ink); white-space: nowrap;
}
.v5-links .v5-dd-menu a:hover { background: var(--v5-paper-2); }
.v5-links .v5-dd-menu a[aria-current="page"] { font-weight: 700; background: var(--v5-paper-2); }
@media (prefers-reduced-motion: reduce) { .v5-dd-menu, .v5-dd-btn::after { transition: none; } }
.v5-cta { display: flex; align-items: center; gap: 16px; }
.v5-phone { display: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.v5-phone:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1100px) { .v5-phone { display: inline; } }
.v5-toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 1.5px solid var(--v5-line); border-radius: 6px;
  background: transparent; cursor: pointer; align-items: center; justify-content: center;
}
.v5-toggle span, .v5-toggle span::before, .v5-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--v5-ink); position: relative; transition: transform .2s;
}
.v5-toggle span::before { position: absolute; top: -6px; }
.v5-toggle span::after { position: absolute; top: 6px; }
.v5-toggle[aria-expanded="true"] span { background: transparent; }
.v5-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.v5-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* Mobile menu */
.v5-menu {
  display: none; position: fixed; inset: var(--v5-nav-h) 0 auto 0; z-index: 899;
  background: var(--v5-paper); border-bottom: 1px solid var(--v5-line); padding: 20px var(--v5-gutter) 28px;
  max-height: calc(100dvh - var(--v5-nav-h)); overflow-y: auto;
}
.v5-menu.open { display: block; }
.v5-menu ul { display: grid; gap: 4px; margin-bottom: 16px; }
.v5-menu .v5-btn { width: 100%; margin-top: 10px; }
.v5-menu .v5-btn:first-of-type { margin-top: 0; }
.v5-menu li a { display: block; padding: 12px 0; font-weight: 600; font-size: 1.1rem; border-bottom: 1px solid var(--v5-line); }
.v5-menu .v5-sub { margin: 0; padding-left: 16px; gap: 0; }
.v5-menu .v5-sub li a { padding: 11px 0; font-weight: 500; font-size: 1rem; color: var(--v5-steel); }
.v5-menu .v5-sub li a[aria-current="page"] { color: var(--v5-ink); font-weight: 600; }
.v5-menu .v5-book { display: block; margin-top: 14px; text-align: center; font-weight: 500; font-size: .95rem; color: var(--v5-steel); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) {
  .v5-links, .v5-cta .v5-btn { display: none; }
  .v5-toggle { display: inline-flex; }
}
@media (min-width: 861px) { .v5-menu { display: none !important; } }

/* Footer */
.v5-footer { padding: 56px 0 48px; border-top: 1px solid var(--v5-line); font-size: .95rem; color: var(--v5-steel); background: var(--v5-paper); position: relative; z-index: 1; }
.v5-footer .v5-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr) minmax(0, 3fr); gap: 36px 48px; align-items: start; }
.v5-footer a:hover { color: var(--v5-ink); text-decoration: underline; text-underline-offset: 3px; }
.v5-foot-brand { display: grid; gap: 14px; }
.v5-foot-brand .v5-logo { color: var(--v5-ink); width: max-content; }
.v5-footer p { color: var(--v5-steel); margin: 0; font-size: .95rem; line-height: 1.55; }
.v5-foot-brand p { max-width: 36ch; }
.v5-footer .v5-foot-h { color: var(--v5-steel); margin: 0 0 12px; }
.v5-foot-contact { display: grid; gap: 4px; }
.v5-foot-contact a { color: var(--v5-ink); font-weight: 600; overflow-wrap: anywhere; }
.v5-footer .v5-wrap > * { min-width: 0; }
.v5-foot-h { font-family: var(--v5-body); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--v5-steel); margin: 0 0 12px; line-height: 1.2; }
.v5-footer ul { display: grid; gap: 8px; }
.v5-footer li a { color: var(--v5-ink); }
.v5-foot-legal { grid-column: 1 / -1; border-top: 1px solid var(--v5-line); padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .88rem; }
.v5-foot-legal nav { display: flex; gap: 20px; }
@media (max-width: 860px) { .v5-footer .v5-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .v5-foot-brand, .v5-foot-contact { grid-column: 1 / -1; } }
@media (max-width: 520px) { .v5-footer .v5-wrap { grid-template-columns: minmax(0, 1fr); } .v5-footer a { overflow-wrap: anywhere; } }

/* ===== legacy overrides for the secondary pages are appended below by scripts/reskin_v5.py ===== */

/* ==== Legacy page overrides (secondary pages) ==== */
/* Old pages had a fixed navbar, so hero sections reserved 110-150px at the top. The v5 header is sticky and in flow. */
.services-hero, .about-hero, .contact-hero, .blog-hero, .resources-hero {
  padding-top: clamp(48px, 7vw, 88px) !important;
  min-height: 0 !important;
}
/* Headings use the display face everywhere */
h1, h2, h3, .h1, .h2, .h3 { font-family: var(--v5-display) !important; }
/* thank-you: centred card now sits between header and footer */
.v5-center { display: flex; align-items: center; justify-content: center; padding: clamp(40px, 8vw, 96px) 24px; min-height: calc(100vh - var(--v5-nav-h)); }
body:has(.v5-center) { display: block !important; padding: 0 !important; height: auto !important; min-height: 0 !important; }
/* contact: option cards must not push the page wider than a 360px phone */
.contact-options-grid > * { min-width: 0; }
.contact-option-card .btn { white-space: normal; text-align: center; max-width: 100%; }
