/* Perth Builder Inspections — site styles */
:root {
  --ink: #14284b;          /* navy: text, headings */
  --ink-soft: #46597a;     /* secondary text */
  --paper: #ffffff;
  --concrete: #eceff0;     /* panels, like a fresh slab */
  --line: #c8d0d6;         /* rules and borders */
  --hivis: #f26b1d;        /* safety orange: actions only */
  --hivis-deep: #b5470f;   /* orange used as text on white */
  --vial: #d9e66a;         /* spirit-level liquid */
  --measure: 72ch;
  --wrap: 1120px;
  --gut: clamp(16px, 4vw, 40px);
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.6rem + 4vw, 4.4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--hivis-deep); }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 {
  font-family: "Archivo", "Arial Narrow", sans-serif;
  font-stretch: 78%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); margin-top: 0; }
h3 { font-size: var(--step-1); font-stretch: 90%; font-weight: 700; line-height: 1.25; }
p, ul, ol { margin: 0 0 1em; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 0.35em; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 60ch; }
.small { font-size: var(--step--1); color: var(--ink-soft); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Archivo", sans-serif; font-stretch: 80%; font-weight: 800; font-size: 1.25rem; line-height: 1; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-family: "Public Sans", sans-serif; font-weight: 400; font-size: 0.75rem; color: var(--ink-soft); margin-top: 3px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--hivis); text-decoration-thickness: 3px; }
.nav .tel { font-variant-numeric: tabular-nums; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); }

@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--paper); flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); padding: 8px var(--gut) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--concrete); }
  .nav .btn { margin-top: 12px; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--hivis);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: 0.8em 1.3em;
  border-radius: 6px;
  border: 2px solid var(--hivis);
  line-height: 1.2;
}
.btn:hover { background: #ff7d33; color: var(--ink); }
.btn-quiet { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 0; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-bottom: 1.6em; }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 600; font-size: 0.95rem; }
.hero-facts li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hivis); margin-right: 8px; vertical-align: 2px; }

/* The spirit level: the one memorable element */
.level { margin: clamp(36px, 6vw, 64px) 0 0; position: relative; height: 64px; }
.level::before { /* the level body */
  content: ""; position: absolute; inset: 0; background: var(--ink); border-radius: 6px;
}
.level .vial {
  position: absolute; left: 50%; top: 50%; width: min(360px, 60%); height: 28px; transform: translate(-50%, -50%);
  background: var(--vial); border-radius: 14px; box-shadow: inset 0 2px 4px rgba(20,40,75,.35); overflow: hidden;
}
.level .vial::before, .level .vial::after { /* the two marks either side of level */
  content: ""; position: absolute; top: 3px; bottom: 3px; width: 2px; background: var(--ink);
  left: calc(50% - 30px);
}
.level .vial::after { left: calc(50% + 28px); }
.level .bubble {
  position: absolute; top: 5px; left: calc(50% - 22px); width: 44px; height: 18px; border-radius: 9px;
  background: rgba(255,255,255,.85);
  animation: settle 1.6s cubic-bezier(.3,1.4,.5,1) .3s both;
}
.level .ends { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; color: #c9d3e3; font-size: 0.8rem; font-weight: 600; }
@keyframes settle { from { transform: translateX(-120px); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .level .bubble { animation: none; } }
@media (max-width: 600px) { .level .ends { display: none; } .level .vial { width: 80%; } }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tint { background: var(--concrete); }
.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); }

/* Stage sequence (a real sequence, so it is numbered) */
.stages { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 3px solid var(--ink); counter-reset: stage; }
.stages li { padding: 20px 20px 24px 0; border-right: 1px solid var(--line); counter-increment: stage; }
.stages li + li { padding-left: 20px; }
.stages li:last-child { border-right: 0; }
.stages li::before { content: counter(stage); display: block; font-family: "Archivo", sans-serif; font-stretch: 75%; font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--hivis-deep); margin-bottom: 12px; }
.stages h3 { margin-bottom: 0.4em; }
.stages p { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0.6em; }
.stages .price { font-weight: 700; color: var(--ink); }
@media (max-width: 860px) {
  .stages { grid-template-columns: 1fr 1fr; }
  .stages li { border-bottom: 1px solid var(--line); padding-left: 0 !important; padding-right: 16px; }
  .stages li:nth-child(2) { border-right: 0; padding-left: 16px !important; }
  .stages li:nth-child(4) { padding-left: 16px !important; }
}
@media (max-width: 520px) {
  .stages { grid-template-columns: 1fr; }
  .stages li, .stages li:nth-child(2), .stages li:nth-child(4) { border-right: 0; padding-left: 0 !important; }
}

/* Three plain reasons, set as a ruled list rather than cards */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.reasons > div { border-top: 1px solid var(--ink); padding-top: 16px; }
.reasons p { color: var(--ink-soft); }
@media (max-width: 760px) { .reasons { grid-template-columns: 1fr; gap: 24px; } }

/* Price table */
.price-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.price-table th, .price-table td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table thead th { font-size: var(--step--1); color: var(--ink-soft); font-weight: 600; border-bottom: 2px solid var(--ink); }
.price-table td.num, .price-table th.num { text-align: right; padding-right: 0; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.price-table td span { display: block; font-size: var(--step--1); color: var(--ink-soft); font-weight: 400; }
.table-scroll { overflow-x: auto; }

/* Two-column layout for inner pages */
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--step-4); max-width: 18ch; }
.crumbs { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; padding: 48px 0 72px; }
.aside-box { border: 2px solid var(--ink); border-radius: 8px; padding: 22px; position: sticky; top: 96px; }
.aside-box .from { font-family: "Archivo", sans-serif; font-stretch: 78%; font-weight: 800; font-size: 2.4rem; line-height: 1; margin: 4px 0 8px; }
.aside-box ul { padding-left: 1.1em; font-size: 0.95rem; }
.aside-box .btn { display: block; text-align: center; margin-top: 8px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .aside-box { position: static; } }

.checks { columns: 2; column-gap: 32px; padding-left: 1.1em; }
@media (max-width: 600px) { .checks { columns: 1; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: "Archivo", sans-serif; font-weight: 800; font-size: 1.4rem; line-height: 1; color: var(--hivis-deep); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 12px 0 0; max-width: var(--measure); color: var(--ink-soft); }

/* CTA band */
.cta-band { background: var(--ink); color: var(--paper); padding: 56px 0; }
.cta-band h2 { color: var(--paper); margin-bottom: 0.3em; }
.cta-band p { color: #c9d3e3; margin-bottom: 1.4em; }
.cta-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.cta-band a.tel { color: var(--paper); font-weight: 700; }

/* Forms */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; max-width: 760px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; }
.form .hint { display: block; font-weight: 400; font-size: var(--step--1); color: var(--ink-soft); }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid #8a97a8; border-radius: 6px; padding: 11px 12px;
}
.form textarea { min-height: 120px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { width: auto; margin-top: 5px; }
.form .hp { position: absolute; left: -5000px; }
.form button { font: inherit; cursor: pointer; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* Guides list */
.guide-list { list-style: none; padding: 0; margin: 0; }
.guide-list li { border-top: 1px solid var(--line); padding: 20px 0; }
.guide-list a { font-family: "Archivo", sans-serif; font-stretch: 85%; font-weight: 700; font-size: var(--step-1); text-decoration: none; }

/* Footer */
.site-foot { border-top: 3px solid var(--ink); padding: 48px 0 32px; font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font-size: 1.1rem; font-stretch: 90%; margin-bottom: 0.8em; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 6px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.foot-base { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: var(--step--1); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* Mobile call bar */
.call-bar { display: none; }
@media (max-width: 640px) {
  .call-bar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; border-top: 1px solid var(--line); }
  .call-bar a { text-align: center; padding: 14px 8px; font-weight: 700; text-decoration: none; background: var(--paper); }
  .call-bar a + a { background: var(--hivis); color: var(--ink); }
  body { padding-bottom: 56px; }
}
