/* poolsafetyhelp.com.au — design system
   Static template kit. No frameworks, no build step.
   ------------------------------------------------- */

:root {
  /* Colour */
  --navy: #0E3A4C;        /* headers, footer, headings */
  --navy-deep: #0A2C3B;
  --aqua: #1B8FA6;        /* accents, borders, badges */
  --aqua-ink: #14707F;    /* link text — darker aqua for WCAG AA on white */
  --wash: #F4FAFB;        /* alternating section tint */
  --wash-deep: #E3F0F3;
  --orange: #E8632B;      /* primary CTAs ONLY */
  --orange-deep: #CE4F1B;
  --ink: #1A1A1A;
  --ink-soft: #445A63;
  --line: #D8E4E8;
  --white: #FFFFFF;
  --good: #1E7B4F;
  --warn-bg: #FDF3E7;
  --warn-line: #E8632B;
  --info-bg: #EDF6F8;

  /* Type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-0: 0.8125rem;
  --fs-1: 0.9375rem;
  --fs-2: 1.125rem;   /* base 18px */
  --fs-3: 1.25rem;
  --fs-4: 1.5rem;
  --fs-h2: clamp(1.5rem, 1.2rem + 1.5vw, 1.875rem);
  --fs-h1: clamp(1.9rem, 1.4rem + 2.6vw, 2.75rem);

  /* Space & shape */
  --sp-1: 0.5rem;
  --sp-2: 0.75rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2.25rem;
  --sp-6: 3.5rem;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(14, 58, 76, 0.10), 0 4px 14px rgba(14, 58, 76, 0.06);
  --container: 1100px;
  --prose: 72ch;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-2);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-3); font-weight: 700; }
h4 { font-size: var(--fs-2); font-weight: 600; }
p, ul, ol { margin: 0 0 1em; }
p { text-wrap: pretty; }
a { color: var(--aqua-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-3); }
.section { padding: var(--sp-6) 0; }
.section-tint { background: var(--wash); }
.section-navy { background: var(--navy); color: #E9F3F5; }
.section-navy h2, .section-navy h3 { color: var(--white); }
.prose { max-width: var(--prose); }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.lede { font-size: var(--fs-3); color: var(--ink-soft); max-width: var(--prose); }
.kicker { font-size: var(--fs-0); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--aqua-ink); margin: 0 0 var(--sp-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; font-size: var(--fs-2);
  padding: 0.8rem 1.4rem; min-height: 48px;
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-deep); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--wash); color: var(--navy); }
.btn-ghost { background: var(--white); color: var(--aqua-ink); border-color: var(--aqua); }
.btn-ghost:hover { background: var(--wash); color: var(--navy); }
.btn-sm { font-size: var(--fs-1); padding: 0.55rem 1rem; min-height: 44px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white); border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 64px; flex-wrap: wrap; padding-top: var(--sp-1); padding-bottom: var(--sp-1);
}
.wordmark {
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em;
  color: var(--navy); text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.wordmark:hover { color: var(--navy); }
.wordmark .mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.wordmark .mark svg { width: 16px; height: 16px; }
.wordmark em { font-style: normal; color: var(--aqua-ink); }
.nav { display: flex; gap: var(--sp-3); overflow-x: auto; flex: 1 1 100%; order: 3; padding-bottom: 2px; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: var(--fs-1); white-space: nowrap; padding: 0.35rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--aqua-ink); box-shadow: inset 0 -2px 0 var(--aqua); }
.header-cta { margin-left: auto; }
@media (min-width: 800px) {
  .nav { flex: 1; order: 0; justify-content: center; min-width: 0; overflow-x: auto; }
  .header-cta { margin-left: 0; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: var(--sp-3) 0 0; font-size: var(--fs-1); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.breadcrumbs li { display: flex; align-items: center; gap: 0.25rem; color: var(--ink-soft); }
.breadcrumbs li + li::before { content: "›"; color: var(--aqua); padding: 0 0.15rem; }
.breadcrumbs a { color: var(--aqua-ink); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--wash) 0%, var(--white) 100%); padding: var(--sp-6) 0; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 22ch; }
.hero .lede { margin-bottom: var(--sp-4); }
.page-header { padding: var(--sp-5) 0 var(--sp-4); }

/* ---------- State selector ---------- */
.state-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .state-grid { grid-template-columns: repeat(4, 1fr); } }
.state-card {
  display: block; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-3); text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  min-height: 44px;
}
.state-card:hover { border-color: var(--aqua); color: var(--ink); }
.state-card .abbr {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; height: 34px; padding: 0 0.5rem; border-radius: 7px;
  background: var(--navy); color: var(--white); font-weight: 800; font-size: var(--fs-1); letter-spacing: 0.04em;
  margin-bottom: var(--sp-1);
}
.state-card .name { display: block; font-weight: 700; color: var(--navy); }
.state-card .hint { display: block; font-size: var(--fs-0); color: var(--ink-soft); margin-top: 2px; }

/* ---------- Card grid ---------- */
.card-grid { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-4); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: var(--sp-1);
}
.card h3 { margin: 0; font-size: var(--fs-2); }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a:hover { color: var(--aqua-ink); text-decoration: underline; }
.card p { margin: 0; font-size: var(--fs-1); color: var(--ink-soft); }
.card .more { margin-top: auto; padding-top: var(--sp-1); font-weight: 600; font-size: var(--fs-1); color: var(--aqua-ink); }
.card-icon { width: 40px; height: 40px; border-radius: 9px; background: var(--wash-deep); color: var(--aqua-ink); display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-1); }
.card-icon svg { width: 22px; height: 22px; }

/* ---------- Steps strip ---------- */
.steps { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-4); }
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--aqua); color: var(--white); font-weight: 800; margin-bottom: var(--sp-2);
}
.steps h3 { font-size: var(--fs-2); margin-bottom: 0.3em; }
.steps p { margin: 0; font-size: var(--fs-1); color: var(--ink-soft); }

/* ---------- Trust strip ---------- */
.trust-strip { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; justify-content: center; padding: var(--sp-3) 0; }
.trust-strip span { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--fs-1); font-weight: 600; color: var(--navy); }
.trust-strip .tick { width: 20px; height: 20px; border-radius: 50%; background: var(--aqua); color: var(--white); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.trust-strip .tick svg { width: 11px; height: 11px; }

/* ---------- Key facts / stat row ---------- */
.stat-row { display: grid; gap: var(--sp-2); grid-template-columns: 1fr 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--aqua); border-radius: var(--radius); padding: var(--sp-3); }
.stat .label { display: block; font-size: var(--fs-0); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.25rem; }
.stat .value { display: block; font-size: var(--fs-4); font-weight: 800; color: var(--navy); line-height: 1.15; }
.stat .note { display: block; font-size: var(--fs-0); color: var(--ink-soft); margin-top: 0.25rem; }

/* ---------- Summary box ---------- */
.summary-box { background: var(--wash); border: 1px solid var(--wash-deep); border-radius: var(--radius-lg); padding: var(--sp-4); max-width: var(--prose); }
.summary-box h2, .summary-box h3 { margin-top: 0; }
.summary-box ul { margin-bottom: 0; padding-left: 1.2em; }
.summary-box li { margin-bottom: 0.4em; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: var(--sp-4) 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-1); background: var(--white); }
caption { text-align: left; font-weight: 700; color: var(--navy); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-2); }
th, td { text-align: left; padding: 0.7rem var(--sp-3); border-top: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy); color: var(--white); border-top: 0; font-weight: 700; white-space: nowrap; }
tbody tr:nth-child(even) { background: var(--wash); }
td .sub { display: block; font-size: var(--fs-0); color: var(--ink-soft); }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: var(--sp-4) 0; max-width: var(--prose); }
.checklist li { position: relative; padding: 0.35rem 0 0.35rem 2.2rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.55rem;
  width: 22px; height: 22px; border-radius: 50%; background: var(--good);
}
.checklist li::after {
  content: ""; position: absolute; left: 6px; top: 0.85rem;
  width: 10px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg);
}

/* ---------- Callouts ---------- */
.callout { border-radius: var(--radius); padding: var(--sp-3) var(--sp-4); margin: var(--sp-4) 0; max-width: var(--prose); border: 1px solid; }
.callout p:last-child { margin-bottom: 0; }
.callout .callout-title { display: block; font-weight: 700; color: var(--navy); margin-bottom: 0.25rem; }
.callout-info { background: var(--info-bg); border-color: var(--aqua); }
.callout-warning { background: var(--warn-bg); border-color: var(--warn-line); }
.callout-warning .callout-title { color: var(--orange-deep); }

/* ---------- FAQ accordion ---------- */
.faq { max-width: var(--prose); }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); margin-bottom: var(--sp-2); }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; color: var(--navy);
  padding: var(--sp-3) var(--sp-4); padding-right: 3rem; position: relative; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.25rem; top: 50%;
  width: 10px; height: 10px; border-right: 2px solid var(--aqua-ink); border-bottom: 2px solid var(--aqua-ink);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details > div { padding: 0 var(--sp-4) var(--sp-3); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); border-radius: var(--radius-lg); padding: var(--sp-5) var(--sp-4); color: #E9F3F5; margin: var(--sp-5) 0; }
.cta-band h2, .cta-band h3 { color: var(--white); margin-bottom: 0.3em; }
.cta-band p { color: #C4DBE2; max-width: 60ch; }
.cta-band .btn-secondary { border-color: var(--white); color: var(--white); background: transparent; }
.cta-band .btn-secondary:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
@media (min-width: 800px) {
  .cta-band { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
  .cta-band p { margin-bottom: 0; }
  .cta-band .btn-row { flex: none; }
}

/* ---------- Listing cards (directory) ---------- */
.listing-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.listing-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-4); box-shadow: var(--shadow); }
.listing-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); margin-bottom: var(--sp-1); }
.listing-head h3 { margin: 0; font-size: var(--fs-3); }
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--wash-deep); color: var(--navy); border: 1px solid var(--aqua);
  font-size: var(--fs-0); font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); }
.tags { display: flex; flex-wrap: wrap; gap: var(--sp-1); list-style: none; padding: 0; margin: var(--sp-1) 0; }
.tag { font-size: var(--fs-0); font-weight: 600; color: var(--ink-soft); background: var(--wash); border: 1px solid var(--line); padding: 0.15rem 0.6rem; border-radius: 999px; }
.trust-line { font-size: var(--fs-1); color: var(--ink-soft); margin: var(--sp-1) 0 var(--sp-3); }
.listing-contact { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.listing-phone { font-weight: 700; color: var(--navy); }
.listing-phone[hidden] { display: none; }

/* ---------- Empty state ---------- */
.empty-state { background: var(--wash); border: 1px dashed var(--aqua); border-radius: var(--radius-lg); padding: var(--sp-5) var(--sp-4); text-align: center; }
.empty-state h3 { margin-bottom: 0.4em; }
.empty-state p { color: var(--ink-soft); max-width: 48ch; margin: 0 auto var(--sp-3); }
.empty-state .btn-row { justify-content: center; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-4); box-shadow: var(--shadow); }
.form-grid { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .field-full { grid-column: 1 / -1; }
}
.field label { display: block; font-weight: 700; font-size: var(--fs-1); color: var(--navy); margin-bottom: 0.35rem; }
.field .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: var(--fs-0); margin-top: 0.15rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.7rem 0.9rem; min-height: 48px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--white);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--aqua); outline-offset: 1px;
}
.form-note { font-size: var(--fs-0); color: var(--ink-soft); margin-top: var(--sp-2); }

/* ---------- Link blocks ---------- */
.link-columns { columns: 2; column-gap: var(--sp-4); list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .link-columns { columns: 3; } }
.link-columns li { margin-bottom: 0.5rem; break-inside: avoid; }

/* ---------- TOC ---------- */
.toc { background: var(--wash); border: 1px solid var(--wash-deep); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4); margin: var(--sp-4) 0; max-width: var(--prose); }
.toc h2 { font-size: var(--fs-1); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--sp-1); }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin-bottom: 0.3em; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C4DBE2; margin-top: var(--sp-6); font-size: var(--fs-1); }
.footer-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr 1fr; padding: var(--sp-6) 0 var(--sp-4); }
@media (min-width: 800px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.site-footer h2 { color: var(--white); font-size: var(--fs-1); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--sp-2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #C4DBE2; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.15); padding: var(--sp-4) 0; }
.footer-legal .disclaimer { font-size: var(--fs-0); color: #9DBEC8; max-width: 80ch; margin-bottom: var(--sp-2); }
.footer-legal .copyright { font-size: var(--fs-0); color: #9DBEC8; margin: 0; }

/* ---------- Utilities ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.section-head h2 { margin: 0; }
.section-head .all-link { font-weight: 600; white-space: nowrap; }
.mt-0 { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
