/* ============================================================
   Kilmain Express Plumber — base.css
   Reset · tokens · typography · utilities
   ============================================================ */

/* ---------- Reset (modern, focused) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Tokens ---------- */
:root {
  /* Color — cool stone + ink + copper. No beige. Footer only dark. */
  --ink:        #15181B;          /* text ink */
  --ink-2:      #22282D;
  --ink-3:      #3B434A;
  --surface-dark: #14181B;        /* footer only — near-black */
  --paper:      #E5E4DE;          /* cool stone — distinctly off the warm-beige axis */
  --paper-2:    #F1EFE8;          /* card surface — lighter stone, slight warmth */
  --line:       #CFCDC4;
  --line-2:     #ACAA9F;
  --muted:      #6B6F75;
  --accent:     #B85120;          /* copper — text contrast OK on stone */
  --accent-deep:#8E3914;          /* deeper for hover / strong contrast */
  --accent-on-dark:#E0824A;       /* used on the dark footer only */
  --accent-tint:#EFD9C0;
  --cta-bg:     #B85120;
  --cta-bg-hover:#8E3914;
  --good:       #3E8050;

  /* Pilot-flame blue — secondary spark used sparingly on schematic
     lines, LED dots, gauge needles. Never as primary accent. */
  --flame:      #1F6FB3;
  --flame-soft: rgba(31, 111, 179, 0.14);

  /* Blueprint grid — engineer's graph-paper backdrop for hero / cta */
  --grid-line:  rgba(20, 24, 27, 0.05);
  --grid-line-strong: rgba(20, 24, 27, 0.08);

  /* Typography
     Display: Boldonse — industrial small-caps display, used UPPERCASE
     Italic accent: Newsreader italic — warm transitional, soft personality
     Body / UI: Inter — neutral grotesk
     Mono: JetBrains Mono — engineering-coded mono */
  --font-display: "Boldonse", "Arial Narrow", sans-serif;
  --font-serif:   "Newsreader", "Hoefler Text", Georgia, serif;
  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Type scale — mobile defaults */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  32px;
  --fs-display: 38px;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Layout */
  --container: 1240px;
  --gutter: 20px;

  /* Radii — only three */
  --r-sm: 4px;
  --r-md: 10px;
  --r-pill: 999px;

  /* Elevation — one card shadow only */
  --shadow-card: 0 14px 32px -16px rgba(20, 24, 27, 0.22);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t: 280ms;
}

@media (min-width: 768px) {
  :root {
    --fs-base: 17px;
    --fs-md:   20px;
    --fs-lg:   26px;
    --fs-xl:   30px;
    --fs-2xl:  40px;
    --fs-display: 52px;
    --gutter: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Base typography ---------- */
html {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
}
h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--ink);
}

h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-lg); letter-spacing: -0.01em; }

em, .italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; text-transform: none; }
h1 em, h2 em, .word-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  color: var(--accent-deep);
  letter-spacing: -0.012em;
  font-size: 1.18em;
  line-height: 0.92;
}

p { max-width: 65ch; color: var(--ink-3); }
p.lead { color: var(--ink-2); font-size: var(--fs-md); max-width: 58ch; }

small, .small { font-size: var(--fs-sm); color: var(--muted); }

strong { font-weight: 600; color: var(--ink); }

a { color: var(--ink); text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(20,24,27,0.25); text-underline-offset: 4px; transition: text-decoration-color var(--t-fast) var(--ease); }
a:hover { text-decoration-color: var(--accent); }

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

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
}

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent-deep); }

.divide-top { border-top: 1px solid var(--line); }
.divide-bottom { border-bottom: 1px solid var(--line); }

/* ---------- Accent scoped to dark backgrounds ----------
   Only footer + cookie banner are dark now. Bump copper to the
   higher-saturation variant inside those contexts. */
.site-footer,
.cookie-banner {
  --accent: var(--accent-on-dark);
  --accent-deep: var(--accent-on-dark);
}

/* ---------- Blueprint grid utility — engineer's graph-paper bg ---------- */
.bg-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-strong) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}
.section--ink.bg-grid,
.cta-band.bg-grid,
.hero.bg-grid {
  background-image:
    linear-gradient(rgba(247, 244, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 244, 238, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(247, 244, 238, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 244, 238, 0.07) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-color: var(--surface-dark);
}

/* ---------- LED indicator dot — boiler control-panel "OK" lamp ---------- */
.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(47, 107, 60, 0.18), inset 0 0 2px rgba(255,255,255,0.4);
  flex-shrink: 0;
  vertical-align: middle;
}
.led--flame { background: var(--flame); box-shadow: 0 0 0 3px var(--flame-soft), inset 0 0 2px rgba(255,255,255,0.4); }
.led--accent { background: var(--accent); box-shadow: 0 0 0 3px rgba(184, 81, 32, 0.18), inset 0 0 2px rgba(255,255,255,0.4); }

/* ---------- Reveal-on-scroll (fade up) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
