/* ==========================================================================
   thompsonelectrical.au
   Brand: royal blue TE monogram (slanted), Montserrat wordmark.
   Buttons are pill shaped and brand blue. Backgrounds are white or cream
   with black text, so a blue button never sits on a blue background.
   The logo's slant appears on the hero edge and tile corners only.
   ========================================================================== */

/* Static weights (cut by _make_fonts.py): sharper on Windows than the variable font. */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-800i.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --blue: #003299;
  --blue-deep: #001F66;
  --cream: #F7F3EA;
  --ink: #14171C;
  --muted: #4B5563;
  --paper: #F2F4F8;
  --line: #D5DAE3;
  --white: #FFFFFF;
  --black: #000000;
  --slant: 14px;               /* horizontal offset of the slanted edges */
  --bar-h: 76px;               /* mobile bottom bar height incl. padding */
  --header-h: 60px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  padding-top: var(--header-h);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 800; text-wrap: balance; }
h1, h2 { font-style: italic; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 7.4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 5.2vw, 2.4rem); }
h3 { font-size: 1.125rem; line-height: 1.25; }
p { margin: 0 0 1rem; max-width: 62ch; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 200; background: var(--white); padding: 8px 12px; }
.lead { font-size: 1.0625rem; }

/* ------------------------------ Buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 12px 26px;
  font: inherit; font-weight: 800; font-size: 1.0625rem; line-height: 1.1;
  text-decoration: none; text-align: center; border: 0; cursor: pointer;
  border-radius: 999px;
  transition: transform .1s ease, background-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-call { background: var(--blue); color: var(--white); }
.btn-call:hover { background: var(--blue-deep); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-deep); }
.btn-white { background: var(--white); color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.btn-white:hover { background: var(--paper); }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.btn-row .btn { flex: 1 1 220px; }

/* ------------------------------- Header --------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  background: var(--white); border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--black); margin-right: auto; }
.logo svg { width: 46px; height: auto; color: var(--blue); flex: none; }
.logo-text { font-size: .6875rem; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase; font-weight: 400; }
.logo-text b { font-weight: 800; display: block; }
.nav-primary { display: none; }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  font-weight: 800; font-size: .9375rem; color: var(--white); text-decoration: none; white-space: nowrap;
  background: var(--blue); border-radius: 999px;
}
.header-phone svg { width: 18px; height: 18px; }
.menu-btn {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  background: none; border: 0; color: var(--ink); cursor: pointer;
}
.menu-btn svg { width: 26px; height: 26px; }

.drawer {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 90;
  background: var(--white); padding: 12px 16px calc(var(--bar-h) + 24px);
  overflow-y: auto; display: none;
}
.drawer.is-open { display: block; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer a { display: flex; align-items: center; min-height: 52px; font-weight: 700; font-size: 1.0625rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.drawer a[aria-current="page"] { color: var(--blue); }
.drawer h2 { font-size: .875rem; font-style: normal; color: var(--muted); margin: 20px 0 4px; }

@media (max-width: 359px) { .logo-text { display: none; } }

/* ---------------------------- Mobile call bar ---------------------------- */
.call-bar {
  position: fixed; inset: auto 0 0 0; z-index: 110;
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
}
.call-bar .btn { min-height: 56px; padding: 8px 10px; font-size: 1rem; }
body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

/* -------------------------------- Hero ---------------------------------- */
.hero { background: var(--white); color: var(--ink); }
.hero-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: var(--pos, 50% 60%); }
.hero-copy {
  position: relative; padding: 34px 16px 30px; margin-top: -28px;
  background: var(--white);
  clip-path: polygon(0 28px, 100% 0, 100% 100%, 0 100%);
}
.hero-copy h1 { margin-top: 12px; }
.hero-copy p { margin-top: 14px; font-size: 1.0625rem; }

/* ------------------------------ Trust strip ------------------------------ */
.trust { background: var(--cream); color: var(--ink); border-block: 1px solid var(--line); }
.trust ul { list-style: none; margin: 0; padding: 18px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.trust li { font-size: .875rem; line-height: 1.3; color: var(--muted); }
.trust b { display: block; font-size: 1.0625rem; font-weight: 800; color: var(--ink); }

/* ------------------------------- Sections -------------------------------- */
.band { padding: 52px 0; }
.band-paper { background: var(--paper); }
.band-cream { background: var(--cream); }
.band-head { margin-bottom: 26px; }
.band-head p { margin-top: 12px; color: var(--muted); }

/* Service tiles */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.service a { display: block; height: 100%; background: var(--white); color: var(--ink); text-decoration: none; transition: transform .1s ease; }
.service a:active { transform: scale(.97); }
.service img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 0 100%); }
.service div { padding: 10px 12px 16px; }
.service h3 { color: var(--blue); }
.service p { font-size: .875rem; line-height: 1.45; margin-top: 6px; color: var(--muted); }

/* Two-column feature rows */
.split { display: grid; gap: 28px; }
.split-photo img { width: 100%; }
.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 16px;
  background: var(--blue); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

/* Before and after */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.pair figure { margin: 0; }
.pair img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pair figcaption { font-size: .875rem; font-weight: 700; margin-top: 8px; }

/* Towns */
.towns { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.towns a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; background: var(--white); color: var(--blue); font-weight: 700; text-decoration: none; border: 2px solid var(--blue); }
.towns a:hover { background: var(--blue); color: var(--white); }

/* FAQ */
.faq-list { border-top: 2px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 14px 0; font-weight: 700; font-size: 1.0625rem; line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 16px; height: 16px;
  background: linear-gradient(var(--blue), var(--blue)) center / 100% 3px no-repeat,
              linear-gradient(var(--blue), var(--blue)) center / 3px 100% no-repeat;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 0 20px; color: var(--muted); }
.more-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; font-weight: 700; }

/* ---------------------------- Call-back form ----------------------------- */
.callback-card { background: var(--white); color: var(--ink); padding: 22px 18px 24px; border-top: 6px solid var(--blue); box-shadow: 0 2px 14px rgba(0, 0, 0, .08); }
.callback-card h2, .callback-card h3 { font-size: 1.5rem; font-style: italic; }
.callback-card > p { color: var(--muted); margin-top: 8px; }
.cb-form { display: grid; gap: 14px; margin-top: 18px; }
.cb-form label { display: grid; gap: 6px; font-weight: 700; font-size: .9375rem; }
.cb-form .opt { font-weight: 500; color: var(--muted); }
.cb-form input, .cb-form textarea {
  width: 100%; min-height: 54px; padding: 12px 14px;
  font: inherit; font-size: 1.0625rem; font-weight: 500; color: var(--ink);
  background: var(--paper); border: 2px solid var(--line); border-radius: 0;
}
.cb-form textarea { min-height: 96px; resize: vertical; }
.cb-form input:focus, .cb-form textarea:focus { outline: none; border-color: var(--blue); background: var(--white); box-shadow: none; }
.cb-form .btn { margin-top: 4px; }
.cb-note { font-size: .875rem; color: var(--muted); text-align: center; margin: 0 auto; }
.cb-error { background: #FDECEC; border-left: 4px solid #B42318; padding: 12px 14px; font-weight: 600; margin-top: 14px; }

/* Slide-up sheet */
.sheet {
  width: 100%; max-width: 480px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0;
  background: transparent; overflow: visible;
}
.sheet::backdrop { background: rgba(0, 16, 51, .72); }
.sheet .callback-card { max-height: 92dvh; overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.sheet[open] { animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-close {
  position: absolute; right: 6px; top: 10px; width: 48px; height: 48px; display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; color: var(--ink);
}
.sheet-close svg { width: 24px; height: 24px; }
.sheet .callback-card h2 { padding-right: 44px; }

/* -------------------------------- Footer --------------------------------- */
.site-footer { background: var(--black); color: #DCE0E7; padding: 44px 0 28px; font-size: .9375rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; gap: 28px; }
.footer-brand svg { width: 70px; color: var(--white); }
.footer-brand p { margin-top: 14px; }
.site-footer h2 { font-size: 1rem; font-style: normal; color: var(--white); margin-bottom: 6px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list a { font-weight: 600; display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.footer-list a:hover { text-decoration: underline; }
.footer-legal { margin-top: 30px; padding-top: 20px; border-top: 1px solid #2B2F36; font-size: .8125rem; }
.footer-legal p { max-width: none; margin-bottom: .5rem; }

/* -------------------------------- Desktop -------------------------------- */
@media (min-width: 900px) {
  :root { --header-h: 76px; }
  body { padding-bottom: 0; }
  .call-bar, .menu-btn, .drawer { display: none !important; }
  .logo svg { width: 58px; }
  .logo-text { font-size: .8125rem; }
  .nav-primary { display: block; }
  .nav-primary ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
  .nav-primary a { font-weight: 700; font-size: .9375rem; color: var(--ink); text-decoration: none; padding: 8px 0; }
  .nav-primary a:hover, .nav-primary a[aria-current="page"] { color: var(--blue); box-shadow: 0 3px 0 var(--blue); }
  .header-phone { min-height: 48px; padding: 0 20px; font-size: 1.0625rem; }

  .hero { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .hero-photo { order: 2; }
  .hero-photo img { height: 100%; aspect-ratio: auto; min-height: 520px; }
  .hero-copy {
    margin: 0 -90px 0 0; z-index: 1; clip-path: polygon(0 0, 100% 0, calc(100% - 90px) 100%, 0 100%);
    padding: 64px 130px 64px max(16px, calc((100vw - var(--wrap)) / 2 + 16px));
    display: flex; flex-direction: column; justify-content: center;
  }
  .hero-copy > * { max-width: 520px; }
  .btn-row .btn { flex: 0 1 auto; }

  .trust ul { grid-template-columns: repeat(4, 1fr); padding: 24px 0; }
  .band { padding: 84px 0; }
  .band-head { margin-bottom: 40px; }
  .services { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .service div { padding: 14px 18px 22px; }
  .service h3 { font-size: 1.25rem; }
  .service p { font-size: .9375rem; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .split-narrow { grid-template-columns: 5fr 7fr; }
  .callback-card { padding: 32px 32px 34px; }
  .sheet { margin: auto; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================ Added: inner pages ========================= */

/* Reviews strip (first element under the header on the home page) */
.reviews { background: var(--cream); padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.reviews-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-weight: 700; font-size: .9375rem; }
.reviews-head b { font-size: 1.25rem; font-weight: 800; }
.reviews-head a { margin-left: auto; font-size: .875rem; min-height: 44px; display: inline-flex; align-items: center; }
.stars { color: #E7A500; letter-spacing: 2px; font-size: 1.0625rem; }
.review-track { display: flex; gap: 12px; margin: 8px -16px 0; padding: 4px 16px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.review-track::-webkit-scrollbar { display: none; }
.review { flex: 0 0 min(82vw, 340px); scroll-snap-align: start; background: var(--white); padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 0; }
.review blockquote { margin: 6px 0 0; font-size: .9375rem; line-height: 1.5; }
.review blockquote.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.review figcaption { margin-top: 8px; font-size: .875rem; font-weight: 700; }
.review figcaption span { font-weight: 500; color: var(--muted); }
.review-more { background: none; border: 0; padding: 0; min-height: 40px; font: inherit; font-size: .875rem; font-weight: 700; color: var(--blue); cursor: pointer; text-decoration: underline; }
.reviews-stacked .review-track { flex-direction: column; overflow: visible; margin: 16px 0 0; padding: 0; }
.reviews-stacked .review { flex: none; }

/* Inner page hero without a photo */
.hero-plain { background: var(--cream); padding: 40px 0 36px; border-bottom: 1px solid var(--line); }
.hero-plain p { margin-top: 14px; font-size: 1.0625rem; }
.crumbs { font-size: .8125rem; margin-bottom: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.hero-copy p.crumbs { margin: 0 0 2px; font-size: .8125rem; }

/* Prose and lists */
.prose h2 { margin-bottom: 16px; }
.prose h3 { margin: 24px 0 8px; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; max-width: 62ch; }
.prose li { margin-bottom: .4rem; }
.cols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px 28px; }
.cols li { position: relative; padding-left: 30px; }
.cols li::before { content: ""; position: absolute; left: 0; top: 5px; width: 20px; height: 14px; background: var(--blue); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; display: grid; place-items: center; background: var(--blue); color: var(--white); font-weight: 800; border-radius: 50%; }
.steps b { display: block; font-size: 1.0625rem; }
.notice { background: var(--white); border-left: 6px solid #B42318; padding: 16px 18px; margin-top: 22px; }
.notice p { max-width: none; }

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.gallery figcaption { font-size: .8125rem; line-height: 1.4; margin-top: 6px; color: var(--muted); }

/* Contact details */
.contact-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.contact-list b { display: block; font-size: .875rem; color: var(--muted); font-weight: 600; }
.contact-list a, .contact-list span { font-size: 1.125rem; font-weight: 700; }

@media (min-width: 900px) {
  .review { flex-basis: 360px; }
  .review-track { margin: 8px 0 0; padding: 4px 0 6px; }
  .reviews-stacked .review-track { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero-plain { padding: 64px 0 56px; }
  .cols { grid-template-columns: 1fr 1fr; }
  .cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}

.prose + .cols, .prose + .steps { margin-top: 20px; }

/* ===================== Added: licence logos and credentials ============== */
.cred-logo { display: inline-flex; align-items: center; justify-content: center; background: var(--white); padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; min-height: 44px; }
.cred-logo img { height: 30px; width: auto; }
.trust .cred-logo { margin-bottom: 8px; }
.trust li { display: flex; flex-direction: column; align-items: flex-start; }
.creds-block h2 { margin-bottom: 22px; }
.creds { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.prose + .creds-block, p + .creds-block { margin-top: 26px; }
.creds li { display: flex; align-items: center; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: .875rem; line-height: 1.4; color: var(--muted); }
.creds li b { display: block; font-size: 1.125rem; font-weight: 800; color: var(--ink); }
.creds .cred-logo { flex: none; width: 124px; border: 0; padding: 0; }
.creds .cred-logo img { height: 40px; }
.creds .cred-plain { border-left: 6px solid var(--blue); }
.footer-creds { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.footer-creds .cred-logo { border: 0; }
@media (min-width: 900px) {
  /* Desktop: logo sits beside its text so every item is the same height. */
  .trust ul { grid-template-columns: repeat(3, auto); justify-content: space-between; align-items: center; gap: 18px 28px; }
  .trust li { flex-direction: row; align-items: center; gap: 10px; white-space: nowrap; }
  .trust .cred-logo { margin: 0; padding: 4px 8px; min-height: 0; }
  .trust .cred-logo img { height: 26px; }
  .creds { grid-template-columns: repeat(3, 1fr); }
  .creds li { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 1180px) {
  .trust ul { grid-template-columns: repeat(6, auto); gap: 0 20px; }
}
