/* ClearPath Lineworks — website styles
   Load after fonts.css. Light theme by default; dark follows the visitor's setting.
   Colours, type and spacing are CSS variables so the whole site changes from one place. */

:root {
  /* colour */
  --concrete: #F3F4F1;        /* page background */
  --surface-raised: #FFFFFF;  /* cards, forms */
  --line: #D5D8D3;            /* hairlines, borders */
  --ink: #1B1F23;             /* main text */
  --ink-muted: #545C63;       /* secondary text */
  --asphalt: #1B1F23;         /* dark bands, header, footer */
  --on-asphalt: #FFFFFF;      /* text on asphalt */
  --on-asphalt-muted: #C3C9CE;
  --marking-yellow: #F5C400;  /* brand colour: fills only on light grounds */
  --on-yellow: #1B1F23;       /* text on yellow */
  --yellow-soft: #FFF3C2;
  --layout-blue: #1E5BB8;     /* links, measurements, accessible bay */
  --blue-soft: #E3ECFA;
  --kerb-red: #B8322A;        /* danger and errors only */
  --red-soft: #FBE6E3;
  --focus: #1E5BB8;

  /* type */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-sans: Barlow, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* spacing and corners */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --radius-sm: 2px; --radius-md: 4px; --radius-tile: 10px;
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --concrete: #14171A; --surface-raised: #1E2327; --line: #343B41;
    --ink: #EEF0EC; --ink-muted: #A6AEB4; --asphalt: #262C31; --on-asphalt: #EEF0EC;
    --yellow-soft: #3A3110; --layout-blue: #7AA7F2; --blue-soft: #172B4A;
    --kerb-red: #F07A6A; --red-soft: #3D1612; --focus: #F5C400;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --concrete: #14171A; --surface-raised: #1E2327; --line: #343B41;
  --ink: #EEF0EC; --ink-muted: #A6AEB4; --asphalt: #262C31; --on-asphalt: #EEF0EC;
  --yellow-soft: #3A3110; --layout-blue: #7AA7F2; --blue-soft: #172B4A;
  --kerb-red: #F07A6A; --red-soft: #3D1612; --focus: #F5C400;
  color-scheme: dark;
}

/* ---- base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--concrete); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--layout-blue); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1, h2, h3, .cp-display { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; }
.cp-display { font-size: clamp(40px, 7vw, 64px); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 5vw, 40px); }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
.cp-lead { font-size: 20px; line-height: 1.5; font-weight: 500; max-width: 60ch; margin: 0; }
.cp-label { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.cp-muted { color: var(--ink-muted); margin: 0; }
.cp-measure { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }

.cp-wrap { max-width: var(--max-width); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.cp-stack { display: grid; gap: var(--space-6); }
.cp-stack-tight { display: grid; gap: var(--space-2); }
.cp-section { padding-block: var(--space-16); }
.cp-band-dark { background: var(--asphalt); color: var(--on-asphalt); }

/* ---- header ---------------------------------------------------------- */
.cp-header { background: var(--asphalt); color: var(--on-asphalt); }
.cp-header .cp-wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-4); flex-wrap: wrap; }
.cp-header img { height: 40px; width: auto; }
.cp-nav { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.cp-nav a { color: var(--on-asphalt); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; }
.cp-nav a:hover { color: var(--marking-yellow); }

/* ---- hero: headline above a band of parking bays -------------------------
   The band image repeats left to right, so it works at any screen width. */
.cp-hero { background: var(--asphalt) url("../patterns/hero-bays-band-1920x240.svg") center bottom / auto 160px repeat-x; color: var(--on-asphalt); }
.cp-hero .cp-wrap { padding-block: var(--space-16) calc(160px + var(--space-12)); display: grid; gap: var(--space-6); }
.cp-hero .cp-label { color: var(--marking-yellow); }
.cp-hero .cp-lead { color: var(--on-asphalt-muted); }

/* ---- buttons ----------------------------------------------------------- */
.cp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-6); border-radius: var(--radius-md); border: 2px solid transparent; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.cp-btn-primary { background: var(--marking-yellow); color: var(--on-yellow); }
.cp-btn-primary:hover { filter: brightness(0.95); }
.cp-btn-secondary { background: transparent; color: currentColor; border-color: currentColor; }
.cp-btn-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ---- tags ------------------------------------------------------------- */
.cp-tag { display: inline-flex; align-items: center; justify-self: start; height: 24px; padding: 0 var(--space-2); border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--line); color: var(--ink); }
.cp-tag-yellow { background: var(--yellow-soft); color: var(--ink); }
.cp-tag-blue { background: var(--blue-soft); color: var(--layout-blue); }
.cp-tag-red { background: var(--red-soft); color: var(--kerb-red); }

/* ---- before / after --------------------------------------------------- */
.cp-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.cp-frame { margin: 0; position: relative; aspect-ratio: 4 / 3; max-width: 100%; background: var(--line); border-radius: var(--radius-md); overflow: hidden; }
.cp-frame img { width: 100%; height: 100%; object-fit: cover; }
.cp-frame-empty { height: 100%; display: grid; place-items: center; color: var(--ink-muted); font-size: 14px; }
.cp-frame figcaption { position: absolute; top: 0; left: 0; padding: var(--space-1) var(--space-3); font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: 0.06em; background: var(--asphalt); color: var(--on-asphalt); }
.cp-frame.is-after figcaption { background: var(--marking-yellow); color: var(--on-yellow); }

/* ---- project figures --------------------------------------------------- */
.cp-metrics { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.cp-metrics div { display: flex; flex-direction: column-reverse; gap: var(--space-1); }
.cp-metrics dd { margin: 0; font-family: var(--font-mono); font-weight: 500; font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cp-metrics dt { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }

/* ---- services grid ------------------------------------------------------ */
.cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.cp-card { background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); display: grid; gap: var(--space-2); align-content: start; }
.cp-card p { margin: 0; color: var(--ink-muted); }

/* ---- six-step process --------------------------------------------------- */
.cp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); counter-reset: step; }
.cp-steps li { border-top: 4px solid var(--marking-yellow); padding-top: var(--space-3); display: grid; gap: var(--space-1); align-content: start; counter-increment: step; }
.cp-steps li::before { content: counter(step); font-family: var(--font-mono); font-size: 14px; color: var(--layout-blue); }
.cp-steps strong { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.04em; text-transform: uppercase; }
.cp-steps span { color: var(--ink-muted); font-size: 15px; }

/* ---- quote / testimonial ------------------------------------------------ */
.cp-quote { margin: 0; font-size: 20px; line-height: 1.5; max-width: 60ch; }
.cp-quote cite { display: block; margin-top: var(--space-2); font-style: normal; font-size: 15px; color: var(--ink-muted); }

/* ---- footer -------------------------------------------------------------- */
.cp-footer { background: var(--asphalt); color: var(--on-asphalt); border-top: 8px solid var(--marking-yellow); }
.cp-footer .cp-wrap { padding-block: var(--space-8); display: flex; flex-wrap: wrap; gap: var(--space-6); justify-content: space-between; align-items: center; }
.cp-footer a:not(.cp-btn) { color: var(--marking-yellow); }
.cp-footer .cp-muted { color: var(--on-asphalt-muted); }
