/* ==========================================================================
   Streamline Plumbing — Design System
   Direction: technical drafting. Riser diagrams, schematic hairlines,
   spec-sheet typography. Palette taken from the logo: pipe blue, flame red,
   and the wordmark navy.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — light is the base palette. Dark redefines tokens only.
   -------------------------------------------------------------------------- */
:root {
  /* Ground + surfaces (cool, blue-biased neutrals — chosen, not defaulted) */
  --surface:      #EDF1F4;
  --surface-2:    #F6F8FA;
  --paper:        #FFFFFF;
  --paper-sunk:   #E4EAEF;

  /* Ink + text */
  --text:         #0A141C;
  --text-2:       #46596A;
  --text-3:       #6B7F90;
  --text-invert:  #F4F7F9;

  /* Hairlines — drafting-table linework */
  --line:         #CFD9E1;
  --line-soft:    #E1E8ED;
  --line-strong:  #A9B8C4;

  /* Accent: the pipe blue from the logo mark. The primary brand note. */
  --accent:       #00478F;
  --accent-deep:  #002F66;
  --accent-wash:  #E9F0F8;
  --on-accent:    #FFFFFF;
  /* Heat side of the brand — the flame in the mark. Doubles as alert. */
  --hot:          #C00014;
  --hot-wash:     #FBEBEC;
  --flame:        #E82818;
  --panel-hot:    #FF7C72;

  /* Semantic: green = verified / compliant. Deliberately outside the brand
     pair so it never reads as decoration. */
  --ok:       #0F7A3D;
  --ok-wash:  #E7F3EB;
  --alert:        #C00014;
  --alert-wash:   #FBEBEC;
  --amber:        #8A6212;
  --amber-wash:   #FBF2DE;

  /* Dark-panel tokens — used for inverted sections in BOTH themes */
  --panel:        #001630;
  --panel-2:      #002050;
  --panel-line:   #123A66;
  --panel-text:   #E6EEF8;
  --panel-text-2: #9DB4CE;
  --panel-accent: #4B9FE8;
  --panel-ok: #43C77B;

  /* Type */
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body:    "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Type scale — 1.25 minor third, fluid at the top end */
  --t-xs:   0.75rem;
  --t-sm:   0.8125rem;
  --t-base: 1rem;
  --t-md:   1.125rem;
  --t-lg:   clamp(1.25rem, 0.5vw + 1.15rem, 1.5rem);
  --t-xl:   clamp(1.5rem, 1vw + 1.3rem, 2rem);
  --t-2xl:  clamp(2rem, 2vw + 1.5rem, 2.9rem);
  --t-3xl:  clamp(2.5rem, 4vw + 1.4rem, 4.5rem);

  /* Space */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;     --s-7: 3rem;     --s-8: 4rem;
  --s-9: 6rem;     --s-10: 8rem;

  /* Structure */
  --shell:  1240px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 2px;            /* drafting precision, not soft SaaS */
  --radius-lg: 3px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Dark via OS preference — guarded so an explicit light choice still wins */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface:      #08121A;
    --surface-2:    #0D1922;
    --paper:        #111E28;
    --paper-sunk:   #0A151E;

    --text:         #E9EFF4;
    --text-2:       #9FB2C0;
    --text-3:       #7C90A0;
    --text-invert:  #08121A;

    --line:         #23343F;
    --line-soft:    #1A2831;
    --line-strong:  #374B58;

    --accent:       #5AA9EE;
    --accent-deep:  #82C1F7;
    --accent-wash:  #0A2138;
    --on-accent:    #04203A;
    --hot:          #FF7C72;
    --hot-wash:     #2C1315;
    --flame:        #FF6A45;

    --ok:       #43C77B;
    --ok-wash:  #0B2417;
    --alert:        #FF7C72;
    --alert-wash:   #2C1315;
    --amber:        #E0B457;
    --amber-wash:   #2A2110;

    --panel:        #00101F;
    --panel-2:      #001A3D;
    --panel-line:   #12314F;
  }
}

/* Dark via explicit toggle — wins over a light OS */
:root[data-theme="dark"] {
  --surface:      #08121A;
  --surface-2:    #0D1922;
  --paper:        #111E28;
  --paper-sunk:   #0A151E;

  --text:         #E9EFF4;
  --text-2:       #9FB2C0;
  --text-3:       #7C90A0;
  --text-invert:  #08121A;

  --line:         #23343F;
  --line-soft:    #1A2831;
  --line-strong:  #374B58;

  --accent:       #5AA9EE;
  --accent-deep:  #82C1F7;
  --accent-wash:  #0A2138;
  --on-accent:    #04203A;
  --hot:          #FF7C72;
  --hot-wash:     #2C1315;
  --flame:        #FF6A45;

  --ok:       #43C77B;
  --ok-wash:  #0B2417;
  --alert:        #FF7C72;
  --alert-wash:   #2C1315;
  --amber:        #E0B457;
  --amber-wash:   #2A2110;

  --panel:        #00101F;
  --panel-2:      #001A3D;
  --panel-line:   #12314F;
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface);        /* explicit — never borrow the host ground */
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.022em;
  text-wrap: balance;
  margin: 0;
  color: var(--text);
}

p { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--accent); color: var(--on-accent); }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--flush-top { padding-top: 0; }

/* The asymmetric editorial grid: narrow mono gutter + wide content column */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
}
@media (min-width: 900px) {
  .spread {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4.5rem);
  }
}

.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack--lg { gap: var(--s-6); }
.stack--sm { gap: var(--s-2); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

.prose { max-width: 63ch; }
.prose p + p { margin-top: var(--s-4); }

/* --------------------------------------------------------------------------
   4. Type utilities
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0;
}
.eyebrow--accent { color: var(--accent); }

/* Section index — justified: these ARE ordered systems, not decoration */
.index {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.h-hero  { font-size: var(--t-3xl); letter-spacing: -0.035em; }
.h-major { font-size: var(--t-2xl); letter-spacing: -0.028em; }
.h-mid   { font-size: var(--t-xl); }
.h-minor { font-size: var(--t-lg); letter-spacing: -0.015em; }

.lede { font-size: var(--t-md); color: var(--text-2); line-height: 1.65; }
.muted { color: var(--text-2); }
.small { font-size: var(--t-sm); color: var(--text-2); }

.mono {
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  font-variant-numeric: tabular-nums;
}

.spec {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.accent-text { color: var(--accent); }

/* Underlined inline link that doesn't look like 2003 */
.link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.link:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   5. Riser motif — the structural device. A vertical service line with
      joints, echoing a building riser diagram. Encodes vertical travel
      through the page the way a riser travels a building.
   -------------------------------------------------------------------------- */
.riser {
  position: relative;
  padding-left: var(--s-6);
}
.riser::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em; bottom: 0.2em;
  width: 1px;
  background: var(--line);
}
.riser::after {                      /* the joint */
  content: "";
  position: absolute;
  left: -3px; top: 0.5em;
  width: 7px; height: 7px;
  border: 1px solid var(--accent);
  background: var(--surface);
  transform: rotate(45deg);
}

/* Hairline rule with an accent tick at the origin */
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
  position: relative;
}
.rule::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 2.5rem; height: 1px;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */
.skip {
  position: absolute; left: var(--s-4); top: var(--s-4); z-index: 200;
  background: var(--accent); color: var(--on-accent);
  padding: var(--s-3) var(--s-4);
  font-family: var(--f-mono); font-size: var(--t-sm);
  text-decoration: none;
  transform: translateY(calc(-100% - var(--s-4) - 2px));
}
.skip:focus { transform: none; }

/* Emergency dispatch strip — sits above the masthead */
.dispatch {
  background: var(--panel);
  color: var(--panel-text-2);
  border-bottom: 1px solid var(--panel-line);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.05em;
}
.dispatch__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s-2) var(--s-5);
  padding-block: var(--s-2);
  min-height: 2.25rem;
}
.dispatch__status { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--panel-ok); }
.dispatch__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--panel-ok);
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(67, 199, 123, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(67, 199, 123, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 199, 123, 0); }
}
@media (prefers-reduced-motion: reduce) { .dispatch__dot { animation: none; } }
.dispatch__tel { margin-left: auto; color: var(--panel-text); text-decoration: none; font-weight: 500; }
.dispatch__tel:hover { color: var(--panel-accent); }
.dispatch__sep { color: var(--panel-line); }
@media (max-width: 640px) { .dispatch__hide { display: none; } }

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5);
  min-height: 4.5rem;
}

/* Logo slot — swap the <img> in; the wordmark is the typographic fallback */
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; }
.brand picture { display: block; flex: none; }
.brand__logo { width: 44px; height: 44px; flex: none; display: block; }
.brand__type { display: flex; flex-direction: column; line-height: 1; }
/* Oblique, to echo the italic wordmark in the logo */
.brand__name {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 800; font-size: 1.1875rem;
  letter-spacing: -0.025em; text-transform: uppercase;
  color: var(--text);
}
.brand__sub {
  font-family: var(--f-mono);
  font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-top: 3px;
}

.nav { display: none; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
@media (min-width: 1000px) { .nav { display: flex; } }
.nav__link {
  font-size: 0.9375rem; font-weight: 500;
  text-decoration: none; color: var(--text-2);
  padding-block: var(--s-2);
  position: relative;
  transition: color 0.18s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent);
}

.masthead__actions { display: flex; align-items: center; gap: var(--s-3); }
/* The CTA does not fit beside the toggle and burger on a narrow phone.
   The dispatch strip already carries a tap-to-call, so hide it there.
   Scoped to the parent so it outranks .btn, which is defined further down. */
.masthead__actions .masthead__cta { display: none; }
@media (min-width: 600px) {
  .masthead__actions .masthead__cta { display: inline-flex; }
}

.theme-toggle {
  width: 2.375rem; height: 2.375rem;
  display: inline-grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer; color: var(--text-2);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--text); }
.theme-toggle svg { width: 17px; height: 17px; }
/* Show the icon for the theme the toggle would switch TO. Ordered so an
   explicit choice beats the OS preference in both directions. */
.theme-toggle .i-moon { display: block; }
.theme-toggle .i-sun  { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun  { display: block; }
}
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
:root[data-theme="light"] .theme-toggle .i-sun  { display: none; }

.burger {
  width: 2.375rem; height: 2.375rem;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; color: var(--text);
}
@media (min-width: 1000px) { .burger { display: none; } }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
  padding-block: var(--s-4) var(--s-5);
}
.mobile-nav[data-open="true"] { display: block; }
@media (min-width: 1000px) { .mobile-nav { display: none !important; } }
.mobile-nav a {
  display: block; padding: var(--s-3) 0;
  text-decoration: none; color: var(--text);
  font-size: var(--t-md); font-weight: 500;
  border-bottom: 1px solid var(--line-soft);
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: 0.8125rem 1.375rem;
  border-radius: var(--radius);
  font-family: var(--f-body);
  font-size: 0.9375rem; font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--on-accent); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--text); background: var(--paper); }

.btn--panel { background: transparent; color: var(--panel-text); border-color: var(--panel-line); }
.btn--panel:hover { border-color: var(--panel-text); background: rgba(255,255,255,0.05); }

.btn--lg { padding: 1rem 1.75rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   8. Surfaces — square-cornered, hairline-bordered. Drafting, not SaaS.
   -------------------------------------------------------------------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
}
/* A flex child stretches, which turns an underlined link into a full-width rule */
.card > .link, .card > p > .link { align-self: flex-start; }

.panel {
  background: var(--panel);
  color: var(--panel-text);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
}
.panel h1, .panel h2, .panel h3, .panel h4 { color: var(--panel-text); }
.panel .muted, .panel .lede { color: var(--panel-text-2); }
.panel .eyebrow { color: var(--panel-text-2); }
.panel .spec { color: var(--panel-text-2); }

.section--panel {
  background: var(--panel);
  color: var(--panel-text);
  border-block: 1px solid var(--panel-line);
}
.section--panel h1, .section--panel h2, .section--panel h3 { color: var(--panel-text); }
.section--panel .lede, .section--panel .muted, .section--panel .small { color: var(--panel-text-2); }
.section--panel .eyebrow { color: var(--panel-text-2); }
.section--panel .index { color: var(--panel-accent); }
.section--panel .rule { border-top-color: var(--panel-line); }
.section--panel .rule::before { background: var(--panel-accent); }

.section--sunk { background: var(--surface-2); border-block: 1px solid var(--line-soft); }

/* --------------------------------------------------------------------------
   9. Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.3125rem 0.625rem;
  border-radius: var(--radius);
  font-family: var(--f-mono);
  font-size: var(--t-xs); letter-spacing: 0.05em;
  border: 1px solid var(--line);
  color: var(--text-2);
  background: var(--paper);
}
.badge--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-wash); }
.badge--accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-wash); }
.badge--hot    { color: var(--hot);    border-color: color-mix(in srgb, var(--hot) 42%, transparent);    background: var(--hot-wash); }
.badge--alert  { color: var(--alert);  border-color: color-mix(in srgb, var(--alert) 40%, transparent);  background: var(--alert-wash); }
.badge--amber  { color: var(--amber);  border-color: color-mix(in srgb, var(--amber) 45%, transparent);  background: var(--amber-wash); }

/* Badges inside dark panels re-derive from panel tokens */
.section--panel .badge, .panel .badge {
  background: rgba(255,255,255,0.04);
  border-color: var(--panel-line);
  color: var(--panel-text-2);
}
.section--panel .badge--ok, .panel .badge--ok {
  color: var(--panel-ok);
  border-color: color-mix(in srgb, var(--panel-ok) 38%, transparent);
}
.section--panel .badge--accent, .panel .badge--accent {
  color: var(--panel-accent);
  border-color: color-mix(in srgb, var(--panel-accent) 38%, transparent);
}
.section--panel .badge--hot, .panel .badge--hot {
  color: var(--panel-hot);
  border-color: color-mix(in srgb, var(--panel-hot) 38%, transparent);
}

/* --------------------------------------------------------------------------
   10. Hero — the thesis. Headline + live schematic riser.
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 940px) {
  .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
}

/* The hero title caps a little below the global display size so a four-word
   line such as "Plumbing & heating" fits the title column on wide screens;
   the minimum sits just under --t-3xl so the same line fits 375px phones. */
.hero__title { font-size: clamp(2.3rem, 3.6vw + 1.2rem, 4.25rem); letter-spacing: -0.038em; }
.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  border-top: 1px solid var(--line);
  margin-top: var(--s-2);
}
.hero__proof > div {
  padding: var(--s-4) var(--s-4) var(--s-4) 0;
  border-right: 1px solid var(--line-soft);
}
.hero__proof > div:last-child { border-right: 0; }
.hero__proof dt {
  font-family: var(--f-mono); font-size: var(--t-xs);
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: var(--s-2);
}
.hero__proof dd {
  margin: 0;
  font-family: var(--f-display); font-weight: 700;
  font-size: 1.375rem; letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* The schematic: an isometric riser drawing that reads as a real diagram */
.schematic {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: var(--s-5);
  overflow: hidden;
}
.schematic::before {          /* drafting graph paper */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.schematic__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s-4); margin-bottom: var(--s-4);
  position: relative;
}
.schematic__label {
  font-family: var(--f-mono); font-size: var(--t-xs);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--panel-accent);
}
.schematic__meta { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--panel-text-2); }
.schematic svg { position: relative; width: 100%; height: auto; }

/* Water travelling the riser — restrained, one moving element */
.flow {
  stroke-dasharray: 5 9;
  animation: flow 3.4s linear infinite;
}
/* Offset so the two services do not pulse in lockstep */
.flow--hot { animation-duration: 4.1s; animation-delay: -1.2s; }
@keyframes flow { to { stroke-dashoffset: -56; } }
@media (prefers-reduced-motion: reduce) { .flow { animation: none; } }

.schematic__legend {
  position: relative;
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-4); padding-top: var(--s-4);
  border-top: 1px solid var(--panel-line);
  font-family: var(--f-mono); font-size: var(--t-xs);
  color: var(--panel-text-2);
}
.schematic__legend span { display: inline-flex; align-items: center; gap: var(--s-2); }
.swatch { width: 14px; height: 2px; flex: none; }

/* --------------------------------------------------------------------------
   11. Service catalogue
   -------------------------------------------------------------------------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
/* Four-item grids: auto-fit gives 3 + 1 and leaves a dead cell. Force 2x2. */
@media (min-width: 880px) {
  .svc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.svc {
  background: var(--paper);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
  text-decoration: none; color: inherit;
  transition: background 0.2s var(--ease);
}
a.svc:hover { background: var(--surface-2); }
.svc__ico {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--accent);
  background: var(--accent-wash);
}
.svc__ico svg { width: 18px; height: 18px; }
/* Red marks the heat and gas side of the business, matching the flame in the mark */
.svc__ico--hot {
  color: var(--hot);
  background: var(--hot-wash);
  border-color: color-mix(in srgb, var(--hot) 35%, transparent);
}
.svc__title { font-family: var(--f-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.015em; }
.svc__body { font-size: 0.9375rem; color: var(--text-2); line-height: 1.55; }
.svc__list {
  list-style: none; margin: auto 0 0; padding: var(--s-3) 0 0;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3);
  font-family: var(--f-mono); font-size: var(--t-xs); color: var(--text-3);
}
.svc__list li::before { content: "› "; color: var(--accent); }

/* --------------------------------------------------------------------------
   12. Process — a real ordered sequence, so numbering carries information
   -------------------------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: var(--s-4);
  padding-block: var(--s-5);
  border-top: 1px solid var(--panel-line);
}
.step:last-child { border-bottom: 1px solid var(--panel-line); }
.step__n {
  font-family: var(--f-mono); font-size: var(--t-sm);
  color: var(--panel-accent); font-variant-numeric: tabular-nums;
  padding-top: 0.2em;
}
.step__t { font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); letter-spacing: -0.015em; margin-bottom: var(--s-2); }

/* --------------------------------------------------------------------------
   13. Coverage / service-area chips
   -------------------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.chips li {
  font-family: var(--f-mono); font-size: var(--t-xs);
  padding: 0.375rem 0.6875rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--paper);
}
/* A chip that leads somewhere should look like it does */
.chips a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.18s var(--ease);
}
.chips a:hover { color: var(--accent); }
.chips li:has(a) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.section--panel .chips li { background: rgba(255,255,255,0.04); border-color: var(--panel-line); color: var(--panel-text-2); }

/* --------------------------------------------------------------------------
   14. Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field label { font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.field .req { color: var(--accent); }

.input, .select, .textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  transition: border-color 0.18s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.textarea { resize: vertical; min-height: 7rem; font-family: inherit; }
.select { appearance: none; background-image: none; cursor: pointer; }

.form-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--s-4); }
@media (min-width: 620px) { .form-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.span-2 { grid-column: 1 / -1; }

.form-note { font-size: var(--t-sm); color: var(--text-3); }

.urgency { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s-2); }
.urgency input { position: absolute; opacity: 0; pointer-events: none; }
.urgency label {
  display: block; text-align: center; cursor: pointer;
  padding: 0.6875rem var(--s-3);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--f-mono); font-size: var(--t-xs);
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2);
  transition: all 0.18s var(--ease);
}
.urgency label:hover { border-color: var(--line-strong); }
.urgency input:checked + label { border-color: var(--accent); background: var(--accent-wash); color: var(--accent); font-weight: 600; }
.urgency input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   15. FAQ / disclosure
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: var(--s-5) var(--s-6) var(--s-5) 0;
  font-family: var(--f-display); font-weight: 600; font-size: var(--t-md);
  letter-spacing: -0.015em;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-mono); font-size: 1.25rem; color: var(--accent);
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: var(--s-5); max-width: 62ch; color: var(--text-2); }

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--panel); color: var(--panel-text-2); border-top: 1px solid var(--panel-line); }
.footer a { color: var(--panel-text-2); text-decoration: none; }
.footer a:hover { color: var(--panel-accent); }
.footer__grid {
  display: grid; gap: var(--s-6);
  grid-template-columns: minmax(0,1fr);
  padding-block: var(--s-8) var(--s-6);
}
@media (min-width: 760px)  { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1040px) { .footer__grid { grid-template-columns: 1.5fr 0.9fr 0.9fr 0.9fr 1.1fr; } }
.footer h4 {
  font-family: var(--f-mono); font-size: var(--t-xs);
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--panel-text); font-weight: 500; margin-bottom: var(--s-4);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); font-size: 0.9375rem; }
/* The tagline from the logo, set the way the logo sets it */
.footer__tagline {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--panel-accent);
  margin: 0;
  max-width: 30ch;
  line-height: 1.7;
}

.footer__bar {
  border-top: 1px solid var(--panel-line);
  padding-block: var(--s-5);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  align-items: center; justify-content: space-between;
  font-family: var(--f-mono); font-size: var(--t-xs); color: var(--panel-text-2);
}
.footer .brand__name { color: var(--panel-text); }

/* --------------------------------------------------------------------------
   17. Page header (interior pages)
   -------------------------------------------------------------------------- */
.pagehead { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.crumbs { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--text-3); letter-spacing: 0.06em; }
.crumbs a { text-decoration: none; color: var(--text-3); }
.crumbs a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   18. Notice band (LL152 deadline etc.)
   -------------------------------------------------------------------------- */
.notice {
  display: grid; gap: var(--s-4);
  grid-template-columns: minmax(0,1fr);
  border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  background: var(--amber-wash);
  border-radius: var(--radius);
  padding: var(--s-5);
}
@media (min-width: 780px) { .notice { grid-template-columns: minmax(0,1fr) auto; align-items: center; } }
.notice__k { font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); margin-bottom: var(--s-2); }

/* Countdown readout */
.readout {
  display: flex; gap: var(--s-5); flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.readout div { display: flex; flex-direction: column; gap: var(--s-1); }
.readout b {
  font-family: var(--f-display); font-weight: 800;
  font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1; color: var(--text);
}
.readout span { font-family: var(--f-mono); font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }

/* --------------------------------------------------------------------------
   19. Tables
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 0.9375rem; min-width: 34rem; }
table.data th, table.data td { padding: var(--s-3) var(--s-4); text-align: left; border-bottom: 1px solid var(--line-soft); }
table.data th {
  font-family: var(--f-mono); font-size: var(--t-xs);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); font-weight: 500;
  background: var(--surface-2); white-space: nowrap;
}
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --------------------------------------------------------------------------
   20. Scroll reveal — one restrained entrance
   -------------------------------------------------------------------------- */
/* Gated on .js — set by the head script. Without JS the content simply shows,
   rather than being stranded at opacity 0 forever. */
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
/* Rescue: if site.js never runs (blocked, failed, still loading), the block
   shows itself after 1.5s instead of staying invisible. site.js adds .js-ready
   as its first act, which switches the timer off. */
.js:not(.js-ready) [data-reveal] { animation: reveal-rescue 0s 1.5s forwards; }
@keyframes reveal-rescue { to { opacity: 1; transform: none; } }
.js [data-reveal].is-in {
  opacity: 1; transform: none; animation: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  .js [data-reveal].is-in { transition: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}


/* --------------------------------------------------------------------------
   21. Full logo lockup. Light surfaces only: the wordmark is brand navy and
       the tagline near-black, so neither survives on a dark panel.
   -------------------------------------------------------------------------- */
.lockup { width: 100%; height: auto; display: block; }

/* The logo is supplied on white and its wordmark is brand navy, so it is shown
   on its own light plate and never composited onto the page ground. */
.lockup-plate {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  place-items: center;
}

.about-intro { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 900px) {
  .about-intro {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: clamp(2rem, 5vw, 4rem);
  }
}
