/* Chainwire Fencing Specialist — flagship design system.
   Character: industrial precision. The brand navy from their own logo, galvanised
   zinc greys, one hi-vis safety accent used sparingly (CTAs and markers only).
   Type: Barlow Condensed (signage) over Barlow (spec-sheet body). */

/* ── fonts ─────────────────────────────────────────────────────────────── */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlowcond-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlowcond-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/barlowcond-700.woff2") format("woff2"); }

/* ── tokens ────────────────────────────────────────────────────────────── */
:root {
  --navy-950: #071021;
  --navy-900: #0b1a33;
  --navy-800: #10254a;
  --steel-700: #1d4468;
  --steel-500: #35648f;
  --steel-300: #7fa3c2;
  --zinc-050: #f4f6f8;
  --zinc-100: #e9edf1;
  --zinc-200: #d8dee5;
  --zinc-400: #9aa6b2;
  --ink: #16202c;
  --ink-soft: #43536a;
  --hivis: #f97316;
  --hivis-deep: #c2410c;
  --white: #ffffff;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --radius: 6px;
  --shadow-1: 0 1px 3px rgba(7, 16, 33, .1), 0 4px 14px rgba(7, 16, 33, .06);
  --shadow-2: 0 2px 6px rgba(7, 16, 33, .12), 0 12px 32px rgba(7, 16, 33, .12);
  --wrap: 1160px;
  --wrap-narrow: 800px;
  /* the chainwire diamond, drawn once, used as a whisper of texture on dark bands */
  --mesh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M0 18 18 0l18 18-18 18z' fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1.4'/%3E%3C/svg%3E");
}

/* ── base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
  color: var(--ink); background: var(--white);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--steel-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy-800); }
::placeholder { color: rgba(67, 83, 106, .38); }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; margin: 0 0 .5em; color: var(--navy-900); letter-spacing: .005em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.wrap-narrow { max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-tight { padding-block: clamp(2rem, 5vw, 3.5rem); }

.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel-700);
}
.kicker::before { content: ""; width: 22px; height: 3px; background: var(--hivis); flex: 0 0 auto; }
.surface-dark .kicker, .band-dark .kicker { color: var(--steel-300); }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  border-radius: var(--radius); padding: .72rem 1.5rem; border: 2px solid transparent;
  cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.btn-primary { background: var(--hivis); color: var(--navy-950); }
.btn-primary:hover { background: #fb8a33; color: var(--navy-950); transform: translateY(-1px); }
.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--steel-700); color: var(--white); }
.btn-ghost { border-color: var(--zinc-200); color: var(--navy-900); background: var(--white); }
.btn-ghost:hover { border-color: var(--steel-500); color: var(--navy-900); }
.surface-dark .btn-ghost, .band-dark .btn-ghost { background: transparent; border-color: rgba(255,255,255,.42); color: var(--white); }
.surface-dark .btn-ghost:hover, .band-dark .btn-ghost:hover { border-color: var(--white); color: var(--white); }

/* ── header ────────────────────────────────────────────────────────────── */
.topline { background: var(--navy-950); color: var(--zinc-200); font-size: .92rem; }
.topline .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; flex-wrap: wrap; padding-block: .25rem; }
.topline a:not(.btn) { color: var(--zinc-100); text-decoration: none; }
.topline a:not(.btn):hover { color: var(--white); text-decoration: underline; }
.topline .tl-note { color: var(--steel-300); }
.topline .tl-contact { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.site-head { background: var(--white); border-bottom: 1px solid var(--zinc-200); position: sticky; top: 0; z-index: 60; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand img { width: 196px; height: auto; }
.nav-primary { display: flex; align-items: center; gap: .25rem; }
.nav-primary a:not(.btn) {
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--navy-900); text-decoration: none;
  padding: .55rem .7rem; border-radius: 4px;
}
.nav-primary a:not(.btn):hover { background: var(--zinc-050); color: var(--navy-800); }
.nav-primary a.btn-primary { color: var(--navy-950); margin-left: .4rem; }
/* active state: <body data-page="services"> etc. */
body[data-page="services"] .nav-primary a[href="/services/"],
body[data-page="fabrication"] .nav-primary a[href="/general-light-fabrication/"],
body[data-page="areas"] .nav-primary a[href="/serviced-areas/"],
body[data-page="projects"] .nav-primary a[href="/projects/"],
body[data-page="guides"] .nav-primary a[href="/blog/"],
body[data-page="about"] .nav-primary a[href="/about-us/"] {
  color: var(--hivis-deep); box-shadow: inset 0 -3px 0 var(--hivis);
}
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--navy-900); }

@media (max-width: 1023px) {
  .nav-toggle { display: block; }
  .nav-primary {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--zinc-200);
    padding: .5rem 1rem 1rem; box-shadow: var(--shadow-2);
  }
  .nav-primary.open { display: flex; }
  .nav-primary a:not(.btn) { padding: .8rem .5rem; border-bottom: 1px solid var(--zinc-100); border-radius: 0; }
  .nav-primary a.btn-primary { margin: .8rem .5rem 0; color: var(--navy-950); }
  .brand img { width: 164px; }
}

/* ── hero + dark bands ─────────────────────────────────────────────────── */
.band-dark {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800) 130%);
  color: var(--zinc-100); position: relative;
}
.band-dark::before { content: ""; position: absolute; inset: 0; background: var(--mesh); pointer-events: none; }
.band-dark > * { position: relative; }
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--white); }
.band-dark p { color: var(--zinc-200); }
.band-dark a:not(.btn) { color: var(--steel-300); }
.band-dark a:not(.btn):hover { color: var(--white); }

.hero { padding-block: clamp(3.4rem, 8vw, 6.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .lede { color: var(--zinc-200); font-size: 1.24rem; }
.hero-points { list-style: none; margin: 1.4rem 0 2rem; padding: 0; display: grid; gap: .55rem; }
.hero-points li { display: flex; gap: .6rem; align-items: baseline; color: var(--zinc-100); }
.hero-points li::before { content: ""; width: 9px; height: 9px; background: var(--hivis); flex: 0 0 auto; transform: rotate(45deg) translateY(-1px); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid rgba(255,255,255,.12); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* proof strip under the hero */
.proof-strip { background: var(--navy-900); border-top: 1px solid rgba(255,255,255,.09); }
.proof-strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 1.1rem; }
.proof-strip .proof { display: flex; flex-direction: column; gap: .1rem; }
.proof b { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: .03em; color: var(--white); }
.proof span { font-size: .9rem; color: var(--steel-300); }
@media (max-width: 860px) { .proof-strip .wrap { grid-template-columns: repeat(2, 1fr); } }

/* ── cards ─────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--zinc-200); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); border-color: var(--steel-300); color: inherit; }
.card-media { aspect-ratio: 16 / 10; background: var(--zinc-100); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.15rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.28rem; }
.card-body p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.card-tag { font-family: var(--font-display); font-weight: 600; font-size: .84rem; letter-spacing: .12em; text-transform: uppercase; color: var(--hivis-deep); }
.card-more { margin-top: auto; padding-top: .6rem; font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--steel-700); }
.card:hover .card-more { color: var(--hivis-deep); }

/* compact list card (areas) */
.card-slim { border: 1px solid var(--zinc-200); border-radius: var(--radius); padding: 1rem 1.15rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .2rem; background: var(--white); transition: border-color .15s ease, box-shadow .15s ease; }
.card-slim:hover { border-color: var(--steel-500); box-shadow: var(--shadow-1); color: inherit; }
.card-slim b { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: .02em; color: var(--navy-900); }
.card-slim span { font-size: .92rem; color: var(--ink-soft); }

/* ── page head (inner pages) ───────────────────────────────────────────── */
.page-head { padding-block: clamp(2.4rem, 5.5vw, 4rem); }
.page-head .lede { margin-top: .4rem; }
.crumbs { font-size: .9rem; margin-bottom: 1rem; color: var(--steel-300); }
.crumbs a { color: var(--steel-300); text-decoration: none; }
.crumbs a:hover { color: var(--white); text-decoration: underline; }
.crumbs span[aria-current] { color: var(--zinc-100); }

/* ── article prose (guides, service body copy) ─────────────────────────── */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.8rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.8em; }
.prose img { border-radius: var(--radius); box-shadow: var(--shadow-1); margin-block: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.6rem 0; padding: 1rem 1.3rem; border-left: 4px solid var(--hivis); background: var(--zinc-050); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-soft); }
.prose blockquote p:last-child { margin: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.6rem 0; font-size: .98rem; }
.prose th { font-family: var(--font-display); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .88rem; text-align: left; background: var(--navy-900); color: var(--white); }
.prose th, .prose td { padding: .6rem .8rem; border: 1px solid var(--zinc-200); }
.prose tr:nth-child(even) td { background: var(--zinc-050); }
.table-scroll { overflow-x: auto; }
.prose hr { border: 0; border-top: 1px solid var(--zinc-200); margin: 2.2rem 0; }
.prose code { background: var(--zinc-100); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.article-meta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: .92rem; color: var(--ink-soft); margin-bottom: 1.6rem; }
.article-meta .card-tag { font-size: .8rem; }

/* references / sources block */
.refs { border-top: 2px solid var(--zinc-200); margin-top: 2.6rem; padding-top: 1.2rem; font-size: .94rem; color: var(--ink-soft); }
.refs h2, .refs h3 { font-size: 1.1rem; margin: 0 0 .6em; }
.refs ol { padding-left: 1.2rem; }

/* ── enquiry form ──────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-900); display: block; margin-bottom: .3rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--zinc-400); border-radius: var(--radius); padding: .65rem .8rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--steel-700); outline: 2px solid rgba(53,100,143,.25); outline-offset: 0; }
textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .9rem; color: var(--ink-soft); }
[data-lead-success], [data-lead-error] { padding: 1rem 1.2rem; border-radius: var(--radius); font-weight: 500; }
[data-lead-success] { background: #e8f5ec; border: 1px solid #9fd4ae; color: #14532d; }
[data-lead-error] { background: #fdecec; border: 1px solid #f3b4b4; color: #7f1d1d; }

/* ── CTA band ──────────────────────────────────────────────────────────── */
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-block: clamp(2.2rem, 5vw, 3.4rem); }
.cta-band h2 { margin: 0 0 .2em; }
.cta-band p { margin: 0; }
.cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ── footer ────────────────────────────────────────────────────────────── */
.site-foot { background: var(--navy-950); color: var(--zinc-200); position: relative; margin-top: 0; }
.site-foot::before { content: ""; position: absolute; inset: 0; background: var(--mesh); pointer-events: none; }
.site-foot > .wrap { position: relative; }
.site-foot a:not(.btn) { color: var(--zinc-200); text-decoration: none; }
.site-foot a:not(.btn):hover { color: var(--white); text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2rem; padding-block: 3rem 2rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand img { width: 190px; margin-bottom: .9rem; }
.foot-brand p { font-size: .95rem; color: var(--zinc-400); max-width: 34ch; }
.foot-h { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--steel-300); margin: 0 0 .8rem; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .97rem; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.2rem; font-size: .86rem; color: var(--zinc-400); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot-legal a { color: var(--zinc-400) !important; }

/* ── spec-builder (signature feature) ──────────────────────────────────── */
.spec { background: var(--white); border: 1px solid var(--zinc-200); border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: hidden; }
.spec-head { background: var(--navy-900); color: var(--white); padding: 1rem 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.spec-head b { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; text-transform: uppercase; }
.spec-step { display: none; padding: 1.4rem; }
.spec-step.active { display: block; }
.spec-q { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--navy-900); margin-bottom: .9rem; }
.spec-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.spec-opt {
  border: 2px solid var(--zinc-200); border-radius: var(--radius); background: var(--white);
  padding: .85rem .9rem; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer;
  text-align: left; transition: border-color .12s ease, background .12s ease;
}
.spec-opt:hover { border-color: var(--steel-500); }
.spec-opt[aria-pressed="true"] { border-color: var(--hivis); background: #fff7ef; }
.spec-result { padding: 1.4rem; }
.spec-result .match { background: var(--zinc-050); border: 1px solid var(--zinc-200); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.spec-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 1.4rem 1.3rem; }
.spec-back { background: none; border: 0; font: inherit; color: var(--ink-soft); cursor: pointer; text-decoration: underline; }
.spec-count { font-size: .88rem; color: var(--zinc-400); }

/* testimonial cards */
.t-card { margin: 0; background: var(--white); border: 1px solid var(--zinc-200); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; }
.t-card p { margin: 0; }
.t-card footer { font-family: var(--font-display); font-weight: 600; color: var(--steel-700); }
.t-card footer::before { content: "— "; }

/* ── misc ──────────────────────────────────────────────────────────────── */
.badge-row { display: flex; gap: 1.6rem; flex-wrap: wrap; align-items: center; }
.stars { color: var(--hivis); letter-spacing: .1em; }
.checklist { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .55rem; }
.checklist li { display: flex; gap: .6rem; align-items: baseline; }
.checklist li::before { content: "✓"; color: var(--hivis-deep); font-weight: 700; flex: 0 0 auto; }
.notice { background: var(--zinc-050); border: 1px solid var(--zinc-200); border-left: 4px solid var(--steel-700); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.3rem; margin: 1.4rem 0; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.4rem; font-family: var(--font-display); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pagination span.pg { color: var(--ink-soft); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--hivis); color: var(--navy-950); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.sticky-aside { position: sticky; top: 96px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.gallery-grid img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* third-party chat widget: own stacking context BELOW site overlays (kernel README) */
l2-chat { position: relative; z-index: 50; }
