/* Queensland Plumbing And Gas: tokens, base and global chrome (header, footer, menu, action bar, chat).
   Page-specific styles live in home.css, about.css, quote.css and content.css. */

:root {
  --ink: #0e2433;
  --ink-2: #1b3547;
  --ink-3: #22313b;
  --text: #33434e;
  --muted: #4a5a66;
  --muted-2: #5b6a74;
  --copper: #b4501d;
  --copper-dark: #8f3e15;
  --copper-tint: #fdf3ec;
  --copper-tint-2: #f6e6da;
  --copper-notice-text: #7a3512;
  --copper-light: #f0a77c;
  --teal: #1f6f8b;
  --teal-dark: #164f63;
  --teal-tint: #e3eff3;
  --page: #f5f2ec;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --line: #e4dfd6;
  --line-2: #dcd6cc;
  --input-border: #cfc8bc;
  --input-border-2: #b9b2a6;
  --star: #b97a14;
  --star-dark: #e8b04a;
  --success: #2f6b3a;
  --success-bg: #e2efe4;
  --success-text: #1f4d28;
  --error: #a3261b;
  --error-bg: #f6dedb;
  --error-text: #7d1f16;
  --neutral-bg: #f0ede7;
  --on-dark: #c3cfd7;
  --on-dark-2: #a9b8c2;
  --on-dark-3: #b9c7d0;
  --on-dark-strip: #d9e2e8;
  --dark-rule: #23404f;

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);

  --shadow-cta: 0 6px 16px rgba(180, 80, 29, .25);
  --shadow-float: 0 14px 40px rgba(14, 36, 51, .2);
  --shadow-chat: 0 24px 60px rgba(14, 36, 51, .28);
  --shadow-bar: 0 -6px 18px rgba(14, 36, 51, .08);
  --shadow-drop: 0 12px 30px rgba(14, 36, 51, .15);
}

/* ---------- Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, textarea, select, button { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--copper); }
a:hover { color: var(--copper-dark); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Layout switch. Mobile (< 720px) is a purpose-designed layout, not just reflowed desktop. */
@media (max-width: 719.98px) { .d-only { display: none !important; } }
@media (min-width: 720px) { .m-only { display: none !important; } }
/* Mobile side padding is a flat 16px (README). 4vw would give 16.56px at 414px, and the full-bleed carousels
   that bleed by var(--gutter) inside 16px-padded sections then overflowed the page by ~1px. */
@media (max-width: 719.98px) { :root { --gutter: 16px; } }

/* ---------- Type helpers ---------- */
.eyebrow { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--copper); margin: 0 0 12px; }
.h2 { font: 800 40px/1.08 var(--font); font-stretch: 108%; letter-spacing: -.02em; margin: 0; }
.lead { font-size: 19px; line-height: 1.55; color: var(--text); }
@media (max-width: 719.98px) {
  .eyebrow { font-size: 13px; }
  .h2 { font-size: 27px; line-height: 1.12; font-stretch: 105%; }
  .lead { font-size: 16.5px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 13px 22px; border-radius: 8px; border: 0;
  font: 700 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { flex: none; }
.btn--primary { background: var(--copper); color: #fff; }
.btn--primary:hover { background: var(--copper-dark); color: #fff; }
.btn--lg { font-size: 18px; padding: 18px 28px; border-radius: 9px; }
.btn--shadow { box-shadow: var(--shadow-cta); }
.btn--outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--lg.btn--outline { padding: 16px 24px; }
.btn--outline-light { background: transparent; color: #fff; border: 2px solid #fff; }
.btn--outline-light:hover { background: #fff; color: var(--ink); }
.btn--white { background: #fff; color: var(--copper-dark); }
.btn--white:hover { background: var(--page); color: var(--copper-dark); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-2); color: #fff; }
.btn--block { display: flex; width: 100%; }

/* ---------- Brand mark (placeholder logo) ---------- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; min-width: 0; }
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--copper); color: #fff;
  display: grid; place-items: center; font: 800 15px var(--font); font-stretch: 115%;
}
.brand__name { font: 800 19px var(--font); font-stretch: 110%; letter-spacing: -.01em; }

/* ---------- Top strip ---------- */
.topstrip { background: var(--ink); color: var(--on-dark-strip); font-size: 13.5px; line-height: normal; }
.topstrip__in { padding-block: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; }
.topstrip__r { color: var(--on-dark-3); }
@media (max-width: 719.98px) {
  .topstrip { font-size: 12.5px; }
  .topstrip__in { padding: 7px 16px; flex-wrap: nowrap; gap: 10px; }
}

/* ---------- Header ---------- */
.site-header { background: var(--page); border-bottom: 1px solid var(--line-2); }
.site-header__in { min-height: 80px; padding-block: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 16px; font-weight: 500; flex: 1 1 auto; white-space: nowrap; }
.main-nav a { color: var(--ink); text-decoration: none; }
.main-nav a:hover { color: var(--copper); }
.main-nav a[aria-current="page"] { color: var(--copper); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }

/* "Text for a quote" on a computer: sms: links often do nothing there, so the button opens this box instead (site.js). */
.sms-pop { position: absolute; z-index: 60; width: min(320px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(14, 36, 51, .18); padding: 16px; }
.sms-pop p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }
.sms-pop__num { display: block; font-size: 22px; font-weight: 800; letter-spacing: .01em; margin: 2px 0 4px; }
.sms-pop__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sms-pop__actions .btn { min-height: 44px; }
.menu-btn {
  flex: none; width: 48px; height: 48px; border: 0; border-radius: 10px; background: transparent; color: var(--ink);
  display: grid; place-items: center;
}
@media (max-width: 719.98px) {
  .site-header { position: sticky; top: 0; z-index: 30; }
  .site-header__in { height: 64px; min-height: 0; padding: 0 12px 0 16px; flex-wrap: nowrap; justify-content: space-between; gap: 10px; }
  .site-header .brand { gap: 10px; flex: 0 1 auto; }
  .site-header .brand__mark { width: 38px; height: 38px; border-radius: 9px; font-size: 13px; }
  .site-header .brand__name { font: 800 16px/1.1 var(--font); font-stretch: 105%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; letter-spacing: normal; }
  .site-header .brand { min-height: 44px; } /* 44px tap target; no visual change */
  /* The teal ring is only ~2.8:1 against ink; on dark surfaces use the light copper so focus stays visible (3:1+). */
  .mobile-menu :focus-visible, .site-footer :focus-visible, .chat-panel__head :focus-visible, .pricing :focus-visible { outline-color: var(--copper-light); }
  .cta-ink :focus-visible { outline-color: #fff; } /* the About CTA band is copper on mobile */
}
/* Desktop: same idea on the ink surfaces (light copper ring) and white on the copper CTA band (teal on copper is ~1.1:1). */
@media (min-width: 720px) {
  .topstrip :focus-visible, .site-footer :focus-visible, .chat-panel__head :focus-visible, .pricing :focus-visible, .cta-ink :focus-visible { outline-color: var(--copper-light); }
}
.cta :focus-visible { outline-color: #fff; }
.cta-card :focus-visible { outline-color: var(--copper-light); } /* ink article CTA card, all widths */

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 80; background: var(--ink); color: #fff;
  display: flex; flex-direction: column; padding: 12px 16px 24px; overflow: auto;
}
.mobile-menu__top { display: flex; justify-content: space-between; align-items: center; height: 52px; }
.mobile-menu__title { font: 800 16px var(--font); }
.mobile-menu__close { width: 48px; height: 48px; border: 0; background: transparent; color: #fff; font-size: 28px; line-height: 1; }
.mobile-menu nav { display: flex; flex-direction: column; margin: 8px 0 24px; }
.mobile-menu nav a {
  display: flex; justify-content: space-between; align-items: center; min-height: 58px;
  border-bottom: 1px solid var(--dark-rule); color: #fff; text-decoration: none;
  font: 700 21px var(--font); font-stretch: 105%;
}
.mobile-menu nav a span { color: var(--copper-light); }
.mobile-menu nav a[aria-current="page"] { color: var(--copper-light); }
.mobile-menu__cta { min-height: 56px; border-radius: 10px; font-size: 17px; margin-bottom: 12px; }
.mobile-menu__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.mobile-menu__pair .btn { min-height: 52px; border-radius: 10px; }
.mobile-menu__lic { font-family: var(--mono); font-size: 12.5px; line-height: 1.9; color: var(--on-dark-3); margin: 0; }
body.menu-open { overflow: hidden; }
@media (min-width: 720px) { .mobile-menu { display: none !important; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--copper-light); }
.site-footer__grid { padding-top: 56px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 40px; }
.site-footer .brand { margin-bottom: 16px; }
.site-footer .brand__mark { width: 40px; height: 40px; border-radius: 9px; font-size: 14px; }
.site-footer .brand__name { font-size: 17px; color: #fff; }
@media (min-width: 720px) { .site-footer .brand__name { letter-spacing: 0; } }
.site-footer p { margin: 0 0 16px; line-height: 1.6; }
.site-footer__lic { font-family: var(--mono); font-size: 13px; line-height: 1.9; color: var(--on-dark-3); }
.site-footer h2 { color: #fff; font-size: 15px; font-weight: 700; line-height: normal; margin: 0 0 14px; }
.site-footer__list { display: grid; gap: 8px; line-height: 1.4; margin: 0; padding: 0; list-style: none; }
.site-footer__sitelinks .site-footer__list { line-height: normal; }
.site-footer__sitelinks a { color: var(--on-dark); }
.site-footer__sitelinks a:hover { color: #fff; }
/* One line of links to every service page, above the bottom rule (desktop and mobile) */
.site-footer__services { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 20px; padding-bottom: 26px; }
.site-footer__services h2 { margin: 0; }
.site-footer__services ul { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0; padding: 0; list-style: none; line-height: normal; }
.site-footer__services a { color: var(--on-dark); }
.site-footer__services a:hover { color: #fff; text-decoration: underline; }
.site-footer__bottom {
  padding-top: 18px; padding-bottom: 26px; border-top: 1px solid var(--dark-rule);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13.5px; line-height: normal; color: var(--on-dark-2);
}
.site-footer__bottom a { color: var(--on-dark-2); text-decoration: underline; }
@media (max-width: 719.98px) {
  .site-footer { font-size: 14.5px; }
  .site-footer__grid { padding: 30px 16px 0; display: block; }
  .site-footer .brand { gap: 10px; margin-bottom: 12px; }
  .site-footer .brand__mark { width: 36px; height: 36px; border-radius: 8px; font-size: 12px; }
  .site-footer .brand__name { font-size: 16px; font-stretch: 100%; letter-spacing: normal; }
  .site-footer .brand__mark { font-stretch: 100%; }
  .site-footer p { line-height: 1.55; }
  .site-footer__contact .site-footer__list { margin-bottom: 18px; }
  .site-footer__list { line-height: normal; }
  .site-footer__contact .site-footer__list { gap: 10px; }
  .site-footer__contact a[href^="sms:"] { font-weight: 700; }
  .site-footer__lic { font-size: 12.5px; margin-bottom: 16px; }
  .site-footer__bottom { display: block; margin: 0 16px; padding: 14px 0 24px; font-size: 12.5px; line-height: 1.6; }
  .site-footer__bottom > span { display: block; }
  /* Bigger hit areas for the stacked text links (≥ 24px) without moving anything. */
  .site-footer__list a, .site-footer__bottom a { display: inline-block; padding-block: 5px; margin-block: -5px; }
}

/* ---------- Mobile sticky action bar (Home and About) ---------- */
.action-bar {
  position: sticky; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto 1.15fr 1fr; gap: 8px;
  box-shadow: var(--shadow-bar);
}
.action-bar .btn { min-height: 52px; border-radius: 10px; padding: 0 8px; white-space: nowrap; font-size: 15px; letter-spacing: -.01em; }
.action-bar__chat { width: 52px; min-height: 52px; border: 0; border-radius: 10px; background: var(--teal-tint); color: var(--teal-dark); display: grid; place-items: center; }

/* ---------- Pricing chat ---------- */
.chat-root { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat-launcher {
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; box-shadow: 0 10px 28px rgba(14, 36, 51, .3);
}
.chat-launcher:hover { background: var(--ink-2); }
.chat-panel {
  width: 380px; max-width: calc(100vw - 48px); background: #fff; border-radius: 16px; box-shadow: var(--shadow-chat);
  overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column;
}
.chat-panel__head { background: var(--ink); color: #fff; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-panel__title { font-weight: 700; font-size: 16px; margin: 0; }
.chat-panel__sub { font-size: 13px; color: var(--on-dark); }
.chat-panel__close { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; font-size: 22px; line-height: 1; flex: none; }
.chat-log { padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow: auto; background: var(--surface-2); }
.chat-msg { max-width: 86%; padding: 11px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; }
.chat-msg--ai { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); }
.chat-msg--me { align-self: flex-end; background: var(--copper); color: #fff; }
.chat-msg--typing { color: var(--muted); font-style: italic; }
.chat-form { padding: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; margin: 0; }
.chat-form input { flex: 1; min-width: 0; height: 44px; border: 1.5px solid var(--input-border); border-radius: 8px; padding: 0 12px; font-size: 15px; background: #fff; }
.chat-form button { height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--copper); color: #fff; font-weight: 700; }
.chat-form button:hover { background: var(--copper-dark); }
.chat-disclaimer { margin: 0; padding: 0 12px 10px; font-size: 12px; color: var(--muted); }
.chat-backdrop { display: none; }
@media (min-width: 720px) {
  /* Desktop design: tight two-line header, borderless assistant bubbles in ink-3. */
  .chat-panel__head { line-height: normal; }
  .chat-msg--ai { border: 0; color: var(--ink-3); }
}
@media (max-width: 719.98px) {
  /* Full-viewport layer so the backdrop and the bottom sheet have a box to sit in; click-through while closed. */
  .chat-root { inset: 0; z-index: 90; display: block; pointer-events: none; }
  .chat-root:not(.is-open) { visibility: hidden; }
  .chat-root.is-open { pointer-events: auto; }
  .chat-launcher { display: none; }
  .chat-backdrop { display: block; position: absolute; inset: 0; background: rgba(14, 36, 51, .45); }
  .chat-panel {
    position: absolute; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; max-height: 85%;
    border-radius: 18px 18px 0 0; border: 0; box-shadow: none; padding-bottom: env(safe-area-inset-bottom);
  }
  .chat-panel__head { padding: 12px 8px 12px 16px; }
  .chat-panel__sub { font-size: 12.5px; }
  .chat-panel__close { width: 48px; height: 48px; font-size: 26px; }
  .chat-log { flex: 1; max-height: none; padding: 14px; }
  .chat-msg { font-size: 15px; }
  .chat-form { padding: 10px; }
  .chat-form input { height: 48px; border-radius: 9px; font-size: 16px; }
  .chat-form button { height: 48px; border-radius: 9px; font-size: 15px; }
  body.chat-open { overflow: hidden; }
}
